Java GUI problem menu

User Tag List

Results 1 to 6 of 6
  1. #1
    raekki's Avatar Member
    Reputation
    1
    Join Date
    Jun 2009
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Java GUI problem

    Hello guys,

    I've a java problem from my collage studies that i can't really handle myself so please if you could take a quick look to question and help me , i would be very gratefull =)

    the problem inc in a wall of text
    --------------------------------

    In this problem, you are asked to write a book checking out system for a library. The library software will have a GUI that enables the librarian to check out library books and to return them. The library software should also allow the librarian to enter a new book that is added to the library collection.

    You should write Java classes that represent

    - a Book
    o its title (a String)
    o its ISBN number (a String that fits the ISBN format)
    o its Dewey decimal number (“QA 76.141.2 v1” for example. This is a String that uniquely identifies every separate copy of every book.)
    o for how many days it can be checked out for (an integer)
    o get and set methods with validity checking for all fields
    o constructors as necessary

    - a check-out record (CheckOutRecord)
    o the name of the person that checked out the book (a String)
    o the check out date (a Date object)
    o the due date (a Date object)
    o the Dewey decimal number of the book that was checked out

    The library software should make use of two ArrayList’s, one storing the list of Books sorted by its Dewey decimal code, the other one storing the CheckOutRecords.

    The software should also use two object files, one storing the ArrayList of Book’s, the other storing the ArrayList of check out records. Whenever a book is added, checked out or returned, these files should be updated along with the corresponding ArrayLists’s. These files should have fixed names. The user should not select the names of these files.

    --------------------
    thanks again =)

    Java GUI problem
  2. #2
    Multitask's Avatar Contributor

    Reputation
    158
    Join Date
    Jan 2008
    Posts
    1,112
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sooo what are you asking? your post has no question

  3. #3
    raekki's Avatar Member
    Reputation
    1
    Join Date
    Jun 2009
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the question is how can i write two classes regarding the problem above while using gui its very complicated for me :/

  4. #4
    raekki's Avatar Member
    Reputation
    1
    Join Date
    Jun 2009
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I mean, i don't need codes i just need a explanationary guide by like writing (not coding) how could i solve this which methods should i use for example the "Dewey decimal number" how and where should i attach it to be found while tracking.But if u would like to explain detailed for dummies like me u can use codes .

  5. #5
    raekki's Avatar Member
    Reputation
    1
    Join Date
    Jun 2009
    Posts
    22
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The code for my problem is the following that i couldnt manage to make the layouts as north and south and also couldnt manage to add the drop down list,

    [import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;

    public class LibaryGui extends JFrame{

    private BorderLayout layout1;
    private JList drop_list;
    private JButton button_checkout = new JButton("Checkout");
    private JButton button_add = new JButton("Add");
    private JTextField Studen_name = new JTextField("Student name");
    private JTextField check_out_date = new JTextField("Check out date");
    private JTextField ISBN_number = new JTextField("ISBN number");
    private JTextField Dewey_number = new JTextField("Dewey number");
    private JTextField book_name = new JTextField("Book Title");

    public LibaryGui(){


    book[] bookArray = new book[50];
    CheckOutRecord[] checkArray = new CheckOutRecord[50];

    drop_list = new JList( bookArray );
    drop_list.setVisibleRowCount( 5 );
    drop_list.setSelectionMode( ListSelectionModel.SINGLE_SELECTION );


    layout1 = new BorderLayout(5,5);
    setLayout(layout1);

    JPanel panel = new JPanel();

    panel.add(Studen_name, BorderLayout.NORTH);
    panel.add(button_checkout, BorderLayout.NORTH);
    panel.add(book_name, BorderLayout.SOUTH);
    panel.add(ISBN_number, BorderLayout.SOUTH);
    panel.add(Dewey_number, BorderLayout.SOUTH);
    panel.add(check_out_date, BorderLayout.SOUTH);
    panel.add(button_add, BorderLayout.SOUTH);
    panel.add(drop_list,BorderLayout.NORTH );

    layout1 = new BorderLayout(5,5);
    setLayout(layout1);

    add(panel);

    button_checkout.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    System.out.println("");
    }
    });
    button_add.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    System.out.println("");
    }
    });
    }
    public static void main(String[] args) {

    LibaryGui frame = new LibaryGui();
    frame.setTitle("Library Program");
    frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    frame.setSize( 500, 250 );
    frame.setVisible( true );

    }
    }]

  6. #6
    ianian112's Avatar Member
    Reputation
    1
    Join Date
    Nov 2008
    Posts
    31
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    JPanel panel = new JPanel(new BorderLayout()); try that

Similar Threads

  1. Java Aes encryption Problems
    By Geraff in forum Elder Scrolls Online General
    Replies: 1
    Last Post: 01-28-2014, 02:24 PM
  2. [Program] Fishbot Refurbished - GUI
    By Cypher in forum World of Warcraft Bots and Programs
    Replies: 9
    Last Post: 12-05-2006, 06:12 AM
  3. I have problem with BHW 3.0
    By sunrize1 in forum World of Warcraft General
    Replies: 1
    Last Post: 07-17-2006, 08:49 AM
  4. wow emu problem
    By bezike in forum World of Warcraft General
    Replies: 0
    Last Post: 07-09-2006, 04:45 PM
  5. Site problems
    By Shanaar in forum Community Chat
    Replies: 10
    Last Post: 05-14-2006, 01:15 AM
All times are GMT -5. The time now is 05:30 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search