Results 1 to 6 of 6

Thread: Saving JFrame

  1. #1
    loopsnhoops is offline Member
    Join Date
    Feb 2011
    Posts
    83
    Rep Power
    0

    Talking Saving JFrame

    Hi,

    I want to create a button that triggers an event which saves a JFrame and puts it on a JList. I also want to create an event which loads the JFrame when I click it on the JList. Doesn't have to be a JList could be a JTable or whatever you feel is more effective. I just want it to work.

    Thanks, Eric

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

    Default

    Quote Originally Posted by loopsnhoops View Post
    O want to create a button that triggers an event which saves a JFrame and puts it on a JList
    Could you clarify your problem and give us a lot more detail? I'm having difficulty figuring out just what you're trying to do.

    I also want to create an event which loads the JFrame when I click it on the JList. Doesn't have to be a JList could be a JTable or whatever you feel is more effective. I just want it to work.
    Again, tell us more about your problem. Are you trying to have a JFrame display other JFrames? If so, that seems a bit odd. Why not use dialogs such as a JDialog, or better yet swap JPanels via CardLayout?

  3. #3
    loopsnhoops is offline Member
    Join Date
    Feb 2011
    Posts
    83
    Rep Power
    0

    Default

    If you want I can give you the code. What I am doing is making a program which saves hockey game results. These results are on a JFrame. I want to put these JFrames or the results of the games on a JList where you can access them.

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

    Default

    It sounds as if you may be confusing program logic with user interface. I think that for your program logic you want to get an individual hockey game's information and then be able to put all the hockey game information in a collection. As far as GUI, it sounds like you want to be able to display both the individual game information and the collective information results and be able to pick which specific game to display by clicking on a display of the collection (perhaps a JList or a JTable), and also be able to add to the collection. I only see one JFrame here and perhaps a separate JPanel with fields that displays an individual game's data and whose data changes depending on what is clicked in the list/table.

    Work through the logic first, creating your HockeyGame class and then your HockeyCollection class, and then start working on your GUI.

  5. #5
    loopsnhoops is offline Member
    Join Date
    Feb 2011
    Posts
    83
    Rep Power
    0

    Default

    I just want to add a Jlist as a column in a jtable

  6. #6
    loopsnhoops is offline Member
    Join Date
    Feb 2011
    Posts
    83
    Rep Power
    0

    Default

    LOL never mind that is another problem I am having. I have been coding for 5 hours straight and my head is a bit fuzzy. Big project tomorrow but if you could help with that problem too I would be very grateful.

Similar Threads

  1. Replies: 5
    Last Post: 06-14-2010, 06:10 PM
  2. Replies: 6
    Last Post: 04-12-2010, 11:33 AM
  3. Passing data from one JFrame to another JFrame
    By tarami in forum New To Java
    Replies: 3
    Last Post: 08-06-2009, 05:44 PM
  4. Replies: 4
    Last Post: 04-22-2009, 11:02 PM
  5. Saving JFrame
    By jralexander in forum New To Java
    Replies: 7
    Last Post: 12-03-2008, 09:19 PM

Tags for this Thread

Posting Permissions

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