wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Class & GUI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Class & GUI" Watch "Class & GUI" New topic
Author

Class & GUI

Colin
Greenhorn

Joined: Nov 26, 2005
Posts: 3
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

Joined: Jul 11, 2001
Posts: 15286
    
    6

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.


GenRocket - A Test Data Generation Platform
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

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
 
subject: Class & GUI
 
Similar Threads
interaction between DB front end
Passing updated data back to a Main GUI and listening to button clicks
Calling seperate functions
How to add a gui from different class
GUI classes, implementing ActionListener.