Results 1 to 4 of 4
  1. #1
    LiquidJava is offline Member
    Join Date
    Sep 2010
    Posts
    4
    Rep Power
    0

    Default Question about a project

    Hi guys. I have a project in college where I have to write a small menu-driven GUI Application which manipulates two instantiable classes.

    Java Code:
    Write a small menu-driven GUI application which manipulates two different instantiable 
    classes written by you.  Each instantiable class should model a different aspect of a system (for 
    example a Book and a Student, as part of a Library system). Your system should allow you to add, 
    display and hold in memory in an appropriate data structure instances of each instantiable class, save 
    the data structure to file and load it up again. Your system should allow the user to process at least one 
    transaction involving an object from each class (eg process the return of a particular Book by a 
    particular Student).  Your code should be well-structured, divided into methods so that each method 
    accomplishes one task.
    I have no problems writing the two classes. The problem I have is actually implementing them in a GUI. Will the code for my GUI be in another class, like a "Tester Class"? :confused::confused:

  2. #2
    berkeleybross's Avatar
    berkeleybross is offline Senior Member
    Join Date
    Feb 2010
    Location
    England
    Posts
    187
    Rep Power
    5

    Default

    You should look at Trail: Creating a GUI With JFC/Swing (The Java™ Tutorials) for details on a GUI.

    However short answer - i always place my gui stuff in a new class which extends JFrame.
    However, you dont have to do this, the main class can also extend JFrame.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Personally, I think that you should rarely if ever extend JFrame since you're rarely altering the JFrame's behavior. Better to just use a JFrame.

  4. #4
    LiquidJava is offline Member
    Join Date
    Sep 2010
    Posts
    4
    Rep Power
    0

    Default

    Ok thanks for the advice. I will try out a few things now and post back if I have any problems.

Similar Threads

  1. Adding a project to an existing project
    By Seijuro in forum NetBeans
    Replies: 4
    Last Post: 08-08-2010, 11:15 AM
  2. Project Question Urgent?
    By newtocs in forum New To Java
    Replies: 1
    Last Post: 10-09-2009, 03:55 PM
  3. open existing project project ..
    By itaipee in forum Eclipse
    Replies: 1
    Last Post: 12-28-2008, 09:12 PM
  4. Replies: 0
    Last Post: 09-28-2008, 12:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •