Results 1 to 6 of 6
  1. #1
    java_newbie is offline Member
    Join Date
    Jul 2007
    Posts
    8
    Rep Power
    0

    Smile Suggestion needed

    Hi
    I am a complete newbie to JAVA. I am basically a C#.Net programmer.
    Now to get started with java. I am trying to re-write one application written in Net beans 5.0 or jcreater.

    Now the problem is there is one parent form. now with in this parent form there are 3 menu buttons and each buttons got sub buttons which are not vissible during design time...(i dont like this feature)..now when i run this program i can go to the sub buttons and after pressing any button it gives me a new form to do the task.....now this guy has written code for creating this new form...so basically there is one form and all the rest 4 forms are coded and which looks really bad. I prefer drag and drop functionality instead of coding the form. So any suggestion how could i change it to the drag and drop form and how to connect it with parent form...

    at the moment the function is called from the parent form button to execute new form...so i am not getting it...like if i create a new form by drag n drop then how am going to connect it with the press on the parent form...

    pls help this newbie ..

    Thanks

  2. #2
    Heather is offline Senior Member
    Join Date
    Jun 2007
    Posts
    164
    Rep Power
    8

    Default

    Do you want a drag and drop tool to do more easier the buttons and menus?
    Please download this plugin
    Cloud Garden - Jigloo GUI Builder (SWT and Swing) for Eclipse

    and then when you download it I'll send you an example if you want.
    Anyway is easy to learn it ;)

  3. #3
    java_newbie is offline Member
    Join Date
    Jul 2007
    Posts
    8
    Rep Power
    0

    Default

    hey but m using Netbeans 5.0 and it support GUI builder...what i wanted to know is that i am unable to create subforms.... the application which i am trying to recreate ...it consist of 1 parent form and then after pressing any button it opens up another form..but they hv written code for the 2nd form..n i want to create it using GUI builder and want to connect the sub form with parent...and i cant see any example to do this...do you have any example which show how to create a sub form frms with a button click in parent form..

  4. #4
    mary is offline Member
    Join Date
    Jul 2007
    Posts
    51
    Rep Power
    0

    Default

    hmmm
    let me see
    here is an example:
    Java Code:
    public class SwingApplication {
    
        public static void main(String[] args) {
    	
            JFrame frame = new JFrame("SwingApplication");
            //...create the components to go into the frame...
            //...stick them in a container named contents...
            frame.getContentPane().add(contents, 
    				BorderLayout.CENTER);
    
            //Finish setting up the frame, and show it.
            frame.addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    System.exit(0);
                }
            });
            frame.pack();
            frame.setVisible(true);
        }
    }
        JButton button = new JButton("call other frame");
       button.addActionListener(this);
      JPanel pane = new JPanel();
    pane.setBorder(BorderFactory.createEmptyBorder(30, 30, 10, 30));
    pane.setLayout(new GridLayout(0, 1));
    pane.add(button);
    
    //when somebody clicks in jbutton it calls the subforms
    button.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          Secondform 2form= new Secondform ();
         2form.pack();
            2form.setVisible(true);
        }
    });

  5. #5
    varunthecool is offline Member
    Join Date
    Jul 2007
    Location
    bangalore,india
    Posts
    19
    Rep Power
    0

    Post well

    why not use JInternalFrame if u want to create a MDI like form...create three internalframes for 3 menu buttons and on click each to get the desired internal frame....at the start sset the visible property of the internal frames to false...and on each action set it to true..
    using netbeans 5.0 u can do this...in the design mode...and if u go check the properties the AccessibleParent property wud ve been set to the main frame

  6. #6
    ezrak is offline Member
    Join Date
    Oct 2008
    Posts
    1
    Rep Power
    0

    Default forms and subforms

    think of a situation where two or more sub forms have been made within a form in the form of JDialog frames. how can one link from one sub form to the other?

Similar Threads

  1. help needed!!! :S
    By mark-mlt in forum Networking
    Replies: 1
    Last Post: 04-14-2008, 09:27 AM
  2. Help needed.
    By necro-1000 in forum AWT / Swing
    Replies: 2
    Last Post: 01-12-2008, 11:37 AM
  3. Give me some suggestion on wedding story book
    By roots in forum Forum Lobby
    Replies: 1
    Last Post: 01-10-2008, 04:17 PM
  4. Help Needed
    By pks in forum New To Java
    Replies: 1
    Last Post: 01-09-2008, 12:07 AM
  5. help needed.
    By dirtycash in forum New To Java
    Replies: 3
    Last Post: 12-03-2007, 09:17 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
  •