How do I add multiple JInternalFrames to 1 main JFrame

It may seem like a silly question but I'd really appreciate any help offered. Sample code might be of assistance.
Thanks people :-)

It's very simple. Create a JFrame,
then create separate classes for each JInternalFrame (here: TFrame, SFrame, GFrame)
Here's some code:
public class GWorkBench extends JFrame {
public GWorkBench() {
//Set up the GUI.
desktop = new JDesktopPane(); //a specialized layered pane
setContentPane(desktop);
setJMenuBar(createMenuBar());
protected JMenuBar createMenuBar() {
JMenuBar menuBar = new JMenuBar();
JMenu menu = new JMenu("Modules");
menu.setMnemonic(KeyEvent.VK_D);
JMenuItem menuItem1 = new JMenuItem("Data Entry");
JMenuItem menuItem2 = new JMenuItem("Search Module");
JMenuItem menuItem3 = new JMenuItem("Generation Module");
menuItem1.setMnemonic(KeyEvent.VK_E);
menuItem2.setMnemonic(KeyEvent.VK_S);
menuItem3.setMnemonic(KeyEvent.VK_G);
menuItem1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
createTFrame();
menuItem2.addActionListener(new ActionListener() {
     public void actionPerformed(ActionEvent e) {
          createSFrame();
menuItem2.addActionListener(new ActionListener() {
     public void actionPerformed(ActionEvent e) {
          createGFrame();
menu.add(menuItem1);
menu.add(menuItem2);
menu.add(menuItem3);
menuBar.add(menu);
return menuBar;

Similar Messages

  • How do I add multiple apple id's to one account

    How do I add multiple Apple id's to one account for billing and Icloud use?

    You don't. You can't combine Apple IDs.

  • How do I add multiple contacts to a group?

    How do I add multiple contacts to a group on my Ipad?

    See if this thread helps.
    https://discussions.apple.com/thread/4114588
    Matt

  • How do i add multiple email addresses to my calendar

    How do I add multiple email addresses to my calendar on my iphone

    You can create an email alias at the mail feature at iCloud.com

  • HT201317 how can I add multiple photos to camera roll

    how can I add multiple photos to camera roll

    If you mean from photo stream, open your photo stream album on your phone in the thumbnail view, tap Edit, tap all the photos to select them, tap Share, then tap Save to Camera Roll.

  • How do I add multiple apple ids to my computer iTunes

    How do I add multiple apple ids to my computer iTunes account

    You can authorize more than one account.
    iTunes Store: Authorize or deauthorize your Mac or PC

  • How do i add multiple hp 8600 printers to one account

    how do i add multiple hp 8600 printers to one account

    Hi rexdalehub,
    If you are referring to the ePrint Center, you can simply choose "Add a printer" to the right of your current printers tab.
    I was an HP employee.
    Reminder: Please select the "Accept as Solution" button on the post that best answers your question. Also, you may select the "Kudos" button on any helpful post to give that person a quick thanks.

  • How do you add multiple iTunes to Keynote

    How do you add multiple songs from the iTunes to your Keynote presentation?

    Jer&Renee,
    welcome to Apple Discussions.
    It depends where you want them in your presentation.
    Open the Media inspector and choose a playlist. In the list of entries, mark those you want to add to Keynote (use command-click to mark multiple titles not in one block).
    Then drag the marked titles either on a slide or on the small Audio field (looks like a frame) in Document inspector. When you then hover the cursor at the Audio "frame", you'll see the quick info "Multiple Files". You cannot change the order or remove one of the files, but only all of them.

  • How do I add multiple addresses/contacts in an email tread to my contact list without having to enter each at a time?

    How do I add multiple addresses/contacts in an email tread to my contact list without having to enter each at a time? I have AppleScript but don't see "add address" in any of the boxes/drop-downs. 

    Sorry, but Address Book does not allow you to select more than one email address to send to in a group. There's really no reason why people need multiple copies of a message, anyway; they have the option of forwarding email to another email address of theirs.
    Mulder

  • How do I add multiple iPads to my Apple ID

    How do I add multiple ipads to my Apple ID

    Should just plug it into iTunes and go. You'll just likely need to give each one a different name. That's what i did when I added my iPad to my iTouch on iTunes.
    When you plug them into the computer, give each  a different name and choose to either make them clones of each other (back up XXXX profile onto this iPad) or set each up as a new iPad.

  • HT1040 How do I add multiple different pictures to my order?

    How do I add multiple pictures to my order? It wants me to check out after each one!

    With the amount of information you've provided it's impossible to offer a potential solution.  We can't see your computer so we need to know the details of your problem and setup, i.e.:
    what version of iPhoto are you using?
    what system version are you running?
    can you post a screenshot of the order window?
    OT

  • How can I add multiple email addresses to Address Book?

    How can I add multiple email addresses to Address Book?
    Can it be done from an .xlsx file?

    I have tried that, but the system reads the emails as one long email and I can't find any way of separating them - it ignores spaces, colons and I have also tried putting them through a word doc... still does not work. It works perfectly easily on a PC system!! ( I have just moved to a mac!)
    any ideas would be good
    thanks

  • How do I add multiple email addresses i have received (900) to my address book instead of doing it one by one?

    how do I add multiple email addresses i have received (+ -900) to my address book instead of having to do it one by one?

    Grab them all and drag them to the Address Book.
    Roger

  • How do I add multiple URL's to a Bookmarks folder?

    Safari question:  How do I add multiple URL's to a Bookmarks folder?

    Ok...
    Click the Bookmarks icon  left side of the Safari toolbar then select Boomarks in the sidebar.
    Locate the folder then try dragging url's to that folder that way.
    If that doesn't work, from your Safari menu bar click Bookmarks >  Add Bookmark then click the, "Add this page to" pop up menu then select the folder you want to save that url to.

  • How can I add multiple email addresses  from spreadsheet into email?

    how can I add multiple email addresses  from spreadsheet into email?

    I have tried that, but the system reads the emails as one long email and I can't find any way of separating them - it ignores spaces, colons and I have also tried putting them through a word doc... still does not work. It works perfectly easily on a PC system!! ( I have just moved to a mac!)
    any ideas would be good
    thanks

Maybe you are looking for

  • How to i get my old contacts back into my iphone

    when i synced my iphone it erased sll my old contacts how doi i get them back

  • Qosmio G40 hangs and some programs are not responding

    Hello and happy holidays to all. Please could i get some help with my G40? The pc is hanging and refusing to work. Ccreens lock and i get constant messages that the program(s)are not responding. I have run all checks i could find, chkdsk in cmd promp

  • Checking List of Specific Files exists in Folder

    Hi all, Please  help and advice business promises that they drop 10 Different Files with TimeStamp. 1. QHP_Group_Association_Benefit_Periods_20140117104957 2. QHP_Out_Of_Pocket_Limit_20140117110805 10.QHP_Strategy_20140117110230 I have a requirement

  • How to pass value from templates to variables

    I have a part of my stylesheet(xslt)like the below example: <xsl:variable name="amount"> <xsl:call-template name="amountaggregate"> <xsl:with-param name="sum"> <xsl:value-of select="number(0)"/> <xsl:with-param> <xsl:with-param name="cucount"> <xsl:v

  • Sharepoint2013 Stop asking for UserName and Password

    Hi, I have Installed New sharePoint2013 Server , I face Issue that Sharepoint Site keep asking for UserName and Password aeach Time. I set as  windows authentication in both IIS and Central Administration , and I configure The IE and I set Automatic