Sinisterly
Need help with SwingUtilities & JComponent - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Coding (https://sinister.li/Forum-Coding)
+--- Forum: Java, JVM, & JRE (https://sinister.li/Forum-Java-JVM-JRE)
+--- Thread: Need help with SwingUtilities & JComponent (/Thread-Need-help-with-SwingUtilities-JComponent)



Need help with SwingUtilities & JComponent - Psycho_Coder - 07-29-2013

Hello HC,

I need some help understanding the concepts of SwingUtilities or JComponent. I am having trouble finding application or how to use them.

Have a look here :-
http://docs.oracle.com/javase/7/docs/api/javax/swing/SwingUtilities.html#calculateInnerArea%28javax.swing.JComponent,%20java.awt.Rectangle%29

there are so many functions I am unable to understand how can I use them in my Swing Apps or in Applets using JApplet.

Also what is the utilities of the Component or JComponent class, I mean to say how to use them and in what manner. I want to know these core components of Java and I am having trouble. It will be very good if I can get some applications or codes that clears my concepts about these. Also, I have already read about these in documentation but I didn't understood well.

Any help would be great!


Thank you,
Sincerely,
Psycho_Coder


RE: Need help with SwingUtilities & JComponent - Deque - 07-29-2013

JComponent: http://docs.oracle.com/javase/tutorial/uiswing/components/jcomponent.html

Actually there is not much to know about these.
Most used method of SwingUtilities is invokeLater() or invokeAndWait(). You can read about these here: http://javarevisited.blogspot.de/2011/09/invokeandwait-invokelater-swing-example.html
Other than that it is just a Utility class, meaning a collection of useful methods for various problems that don't fit anywhere else. Except for the two methods above I rarely needed them, though.

JComponent is an Interface that is implemented by all Swing components. Not more not less.


RE: Need help with SwingUtilities & JComponent - Psycho_Coder - 07-29-2013

(07-29-2013, 07:38 AM)Deque Wrote: JComponent: http://docs.oracle.com/javase/tutorial/uiswing/components/jcomponent.html

Actually there is not much to know about these.
Most used method of SwingUtilities is invokeLater() or invokeAndWait(). You can read about these here: http://javarevisited.blogspot.de/2011/09/invokeandwait-invokelater-swing-example.html
Other than that it is just a Utility class, meaning a collection of useful methods for various problems that don't fit anywhere else. Except for the two methods above I rarely needed them, though.

JComponent is an Interface that is implemented by all Swing components. Not more not less.

I have read the part from the tutorial already. The second link looks very good. Thank you for that. I will read them now.