Results 1 to 5 of 5
  1. #1
    keerthi_y19 is offline Member
    Join Date
    Aug 2008
    Posts
    7
    Rep Power
    0

    Default overlapping forms

    Hii..i have designed a form with 4 menus..if we click on one menu it will display the contecnts in tht page i.e.,the labels n textfields...like tht i have deigned 4 pages..but if we click on one menu and after getting tht page after tht if i click on next menu the labels n textfields are overlapping...i need to know the code so tht we can exit from tht page and go to next page...

  2. #2
    udayadas's Avatar
    udayadas is offline Member
    Join Date
    Aug 2008
    Posts
    22
    Rep Power
    0

    Default Use CardLayout Panel

    Quote Originally Posted by keerthi_y19 View Post
    page i.e.,the labels n textfields...like tht i have deigned 4 pages..........and go to next page...
    I am confused about what does page means.As per my understanding ur problem could be solved by using CardLayout.

  3. #3
    keerthi_y19 is offline Member
    Join Date
    Aug 2008
    Posts
    7
    Rep Power
    0

    Default

    pages means forms...i'm not using card layout...can u tell how to use it...
    if u want i can send u the code and after seeing tht u can get an idea i suppose..

  4. #4
    udayadas's Avatar
    udayadas is offline Member
    Join Date
    Aug 2008
    Posts
    22
    Rep Power
    0

    Default

    Yea if u can...

  5. #5
    Rooneyz is offline Member
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    25
    Rep Power
    0

    Default add remove JPanels from JFrame

    Correct me if I'm wrong but you are trying to put several GUI-elements (JPanels perhaps) on the same JFrame?

    What you need to do is first remove the current JPanel from the JFrame with the panel on it. Next add the new JPanel to the JFrame, easy as that!!!! See example below:

    Java Code:
        
    public void switchPanel(JPanel sourcePanel, JPanel targetPanel)
    {
    jframeObject.remove(sourcePanel);
    jframeObject.add(targetPanel);
    jframeObject.repaint();
    }
    Not sure if the repaint is necessary, check that out. Let us know if one of the solutions works

Similar Threads

  1. Use multiple forms
    By coco in forum Java Applets
    Replies: 2
    Last Post: 06-14-2010, 06:14 AM
  2. Forms Question
    By bradk8605 in forum New To Java
    Replies: 3
    Last Post: 08-13-2008, 09:59 AM
  3. Login Forms
    By dankonsoer in forum New To Java
    Replies: 1
    Last Post: 08-07-2008, 01:06 PM
  4. Replies: 2
    Last Post: 04-28-2008, 11:56 AM
  5. Forms in jsp
    By bbq in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 07-05-2007, 05:28 AM

Posting Permissions

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