+ 13

[Solved] How acess an object of other file ? [Java]

I have 2 class. First class there are objects to make a GUI (label, button..etc) with Jframe (Swing). Second class make serial comunication using event. How I change the method of object in other file ? I want the string received change the method label.setText( ).

20th Jul 2019, 9:07 PM
Pedro H.J
Pedro H.J - avatar
4 Réponses
+ 5
InvBoy [ :: FEDE :: ] (Solved). My friend help me how to use interface. We made the class implements interface. This method created within second class can change objects.
21st Jul 2019, 1:16 PM
Pedro H.J
Pedro H.J - avatar
+ 8
InvBoy [ :: FEDE :: ] I know that I can import to make a new object but I want to acess an object instead a class.
20th Jul 2019, 9:18 PM
Pedro H.J
Pedro H.J - avatar
20th Jul 2019, 9:13 PM
InvBoy [ :: FEDE :: ]
InvBoy [ :: FEDE :: ] - avatar
+ 3
Pedro H.J all in Java is in a class, your object is in a class, import that class to access the object
20th Jul 2019, 10:06 PM
InvBoy [ :: FEDE :: ]
InvBoy [ :: FEDE :: ] - avatar