Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class & GUI

 
Colin
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

i have limited experience in Java and wondered if you could answer my question, if a create a custom class, can that class have a GUI or do i have to reference that class from within an application with a GUI.

Many thanks
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CRWS,

Welcome to Javaranch. We don't have too many rules around here but we do have a Naming Policy. Please read this and adjust your display name accordingly. You can change your display name by clicking here.

Thanks.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if a create a custom class, can that class have a GUI

That class can either create a Frame/JFrame object and construct a GUI or that class can extend Frame/JFrame and become the main frame of the GUI application.

do i have to reference that class from within an application with a GUI.

You can do this as well. You can have a class as stated earlier that constructs a GUI and call that class from another class. A good starting point might be to read Sun's GUI Tutorials.

Also, I am going to move this to the Swing/AWT/SWT/JFace forum where all things GUI are discussed.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic