#Client-Server application trying to pass my streams to a Swing graphics class

1 messages · Page 1 of 1 (latest)

thorny juniperBOT
#

<@&987246399047479336> please have a look, thanks.

thorny juniperBOT
#

While you are waiting for getting help, here are some tips to improve your experience:

Code is much easier to read if posted with syntax highlighting and proper formatting.

If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.

Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.

slate tendon
#

why can't you do that ?

mint zinc
#

In the second part of my code I can't call Menu(out,in)
it appears an error message saying: non static variable out can not be referenced from a static context, same for in variable

#

oh also

#

the second part of the code is inside an automatically generated method

#
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() { 
                public void run() {
                new Menu(out,in).setVisible(true);   
                
            }
        });
thorny juniperBOT
mint zinc
#

which I am now beginning to realise that it may be whats wrong

#

yep removed static and error message is gone

#

I don't understand why this happened but I guess the question can close

slate tendon
#

main must be static

mint zinc
#

Yes but it wasn't my main