Results 1 to 2 of 2
  1. #1
    ibanez270dx is offline Member
    Join Date
    Nov 2007
    Location
    Bay Area, CA
    Posts
    13
    Rep Power
    0

    Default Control Structure Question

    Hi Everyone,
    I'm really new to Java and the control structure is kinda confusing to me... I would just like some clarifications. I have a class that loads up a GUI (with the init() thing) and it has a button in it. I want the user to click the button and then the program executes a bunch of tasks and displays a new JPanel. How would I structure this? Am I going to need 2 classes? One for the initial start JPanel (the panel takes up the whole applet) and one for the secondary panel? I do already have an applet that initializes a gui (JPanel and JButton) and when the button is pressed, it closes the JPanel. I'm just not sure in what manner I should open a new one and execute commands. I usually code PHP and HTML, so this is very different for me... I also haven't done OOP before. In brief, it looks like:

    initialize applet --> opens JPanel with button. (user clicks button) --> closes current JPanel, opens new JPanel, and executes commands.

    If anyone knows what I'm talking about, please help... I am really having a hard time with Java so far...

    Thanks in advance,
    - Jeff

  2. #2
    ibanez270dx is offline Member
    Join Date
    Nov 2007
    Location
    Bay Area, CA
    Posts
    13
    Rep Power
    0

    Default

    sorry, nevermind my question - I figured out that CardLayout will do the trick. Thanks!

Similar Threads

  1. Java Array of Structure
    By PAffiliates in forum New To Java
    Replies: 1
    Last Post: 01-28-2008, 07:08 AM
  2. data structure code
    By vgvt in forum New To Java
    Replies: 1
    Last Post: 01-17-2008, 03:49 PM
  3. X11.Toolkit logging out of control
    By gjsalazar in forum AWT / Swing
    Replies: 0
    Last Post: 11-21-2007, 12:42 AM
  4. Use if then else structure, help
    By paul in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 06:00 AM
  5. Help with Structure
    By Albert in forum New To Java
    Replies: 1
    Last Post: 07-13-2007, 04:27 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
  •