Multiple JFrames in one panel

Hi there!
I need to have multiple windows open at the same time within my application.
Having opened multiple windows, I need to be able to move these small windows around, close them one at a time, and so forth...
All these small JFrames(windows) need to be added to a component which makes it possible to move them around separately, of course. BUT which component does the job???
cheers,
michel

I found a place to start myself on this address:
http://www.cs.cf.ac.uk/Dave/HCI/HCI_Handout_CALLER/node47.html
Thanks, anyway!
cheers,
michel

Similar Messages

  • Creating multiple JFrames in one program

    What kind of trouble should I look for when creating multiple JFrames in one application. These JFrames will talk to each other via drag and drop. Is this ok?

    What kind of trouble would you like? I'm sure you can engineer all kinds. As long as you have a place to hold the frame references, you should be okay. If you need them.
    You can do drag and drop between components in different frames, no problem. Better read up on drag and drop first though.

  • Tint2: Multiple Desktops in one panel but spread over complete width

    Hi,
    I just installed Arch again und my desktop computer which has 2 monitors. I use tint2 as a panel and I have it on my secondary monitor only. I am using Openbox Multihead as Window Manager.
    Now I am able to get two distinct settings for tint2:
    - Showing the currently active desktop with all its windows at the default width
    - Showing all desktops where each desktop section receives the exact same space regardlass of active windows
    What I want: Showing all currently active windows like I had only one desktop (I am fine showing windows on desktop that are currently invisible) while having them spread out over the complete width.
    I know that the 'multi_desktop' option has the goal to be some kind of desktop pager where you can drag applications around. But my goal would be a view just like 'single_desktop' but with all currently opened windows.
    So I can see two possible solutions here:
    - Either tint2 can be configured in this way, or
    - I can trick tint2 by telling Openbox to always look at all desktops (at least if tint2 receives its information from the window manager)
    Is there any possibility to acheive my goal?
    Thanks in advance,
    javex

    It appears there is no solution out there but I did manage to find something else for myself:
    I now use only two desktops, each one is fixed to one monitor and through this, tint2 splits it in half which actually is pretty nice, since I can now switch around windows on monitors via taskbar.
    Should the need for more desktops arise, I will probably use some kind of composite cube or something which will provide the functionality, too.

  • Open Multiple JFrame in one window

    hi all.......
    I've developed one Java-Swing application with Menubar. If i click each menu item Im opening new JFrame. But i want to open this each JFrame in a parent JFrame. For example If i Click File->Open it will open new JFrame as separate, if i again click File->New , it will open another new JFrame for new. likewise it will open each JFrame for each menu item. But I want to open it in a parent window itself. My problem is same like MDI in VB.
    Kindly help me to proceed.........
    thankx.........
    kalai.

    I think you have to use JInternalFrame
    First declare
    JDesktopPane() desktopPane=new JDesktopPane();
    mainFrame.getContentPane().add("Center",desktopPane);
    mainFrame.setVisible(true);
    Simple way is to use Container
    if mnuNew is clicked
    JFrame templateFrame=new JFrame();
    Container container= templateFrame.getContentPane();
    the above frame is object of your <template> frame
    it will add everything in to Container including controls with actListeners
    Now call
    public void createInternalFrame(String title)
         try
         JInternalFrame iFrame=new JInternalFrame();
         iFrame.getContentPane().add(container);
    desktopPane.add(iFrame);
         iFrame.addNotify();
    iFrame.setMaximum(true);
         iFrame.setVisible(true);
    iFrame.setClosable(true);
         iFrame.setTitle(title);
    iFrame.setDefaultCloseOperation(iFrame.DISPOSE_ON_CLOSE);
         }//Try
         catch(Exception E)
    System.out.println("Error "+E);
    }//CreateInternalFrame

  • Can multiple PCs access one remote panel at the same time?

    I've written a program in labview 7.1 to monitor/control a labview application running in the test cell through Remote Panel. I and my coworker can remotely monitor and/or control this labview application individually. But if my coworker has the remote panel displayed on his PC and I try to get the remote panel on my PC, I get a labview error (63) as below:
    "LabVIEW:  Serial port receive buffer overflow.
    LabVIEW:  The network connection was refused by the server."
    My question is: Can multiple PCs access one remote panel at the same time?
    Thanks in advance!
    Y

    Sorry I wasn't clear. The remote panel license is separate from the number of LabVIEW development licenses. Pricing information on remote panel licenses can be found here.

  • Multiple panels on one panel

    i have three panels-mainPanel, panel1, panel2. my mainPanel has a borderlayout. i am trying to set both panels1 and 2 onto the center of the mainpanel. i only want to show one panel at a time until a button is clicked. i have used the setVisible command but i still get a panel with nothing on. is there a way around this. the following is my code. is there a way so i can have both panels in the center with all the components for each panels.
    public class IssueBook extends JFrame{
    private JFrame IssueBook;
    JFrame mainFrame = this;
    private JPanel mainPanel, panel1, panel2;
    public IssueBook() {
    IssueBook = new JFrame("Issue Or Return Book");
    mainPanel = new JPanel();
    panel1 = new JPanel();
    panel2 = new JPanel();
    mainPanel.setLayout(new BorderLayout());
    IssueBookPanel.setLayout(new FlowLayout());
    ReturnBookPanel.setLayout(new FlowLayout());
    mainPanel.add(IssueBookPanel, BorderLayout.CENTER);
    mainPanel.add(ReturnBookPanel, BorderLayout.CENTER);
    panel1.setVisible(true);
    panel2.setVisible(false);
    IssueBook.show( );
    }

    Layout managers and panels are one of those things that has to be studied, the good new is that for the most part it isn't difficult;-import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    public class TwoPanels extends JFrame implements ActionListener {
       JButton start = new JButton("Start");
       JButton submit1 = new JButton("<html><center><b>Add B<br>Remove A</center></html>");
       JButton submit2 = new JButton("<html><center><b>Add A<br>Remove B</center></html>");
       JPanel panel1, panel2, panel3, panel4;
       Container cont;
    public TwoPanels(){
       cont = getContentPane();
       cont.setLayout(new BorderLayout() );
       panel1 = new JPanel();
       panel1.setLayout(new FlowLayout());
       JLabel label1 = new JLabel("My application");
       panel1.add(label1);
       start.addActionListener(this);
       panel1.add(start);
       panel2 = new JPanel();
       panel2.setLayout(new FlowLayout());
       JLabel label = new JLabel("My starting panel");
       panel2.add(label);
       panel3 = new JPanel();
       panel3.setLayout(new FlowLayout());
       panel3.setBackground(Color.magenta);
       JLabel label2 = new JLabel("This is my pink panel, Panel A");
       label2.setForeground(Color.yellow);
       panel3.add(label2);
       submit1.addActionListener(this);
       panel3.add(submit1);
       panel4 = new JPanel();
       panel4.setLayout(new FlowLayout());
       panel4.setBackground(Color.blue);
       JLabel label3 = new JLabel("This is my placid panel, Panel B");
       label3.setForeground(Color.cyan);
       panel4.add(label3);
       submit2.addActionListener(this);
       panel4.add(submit2);
       cont.add("North", panel1);
       cont.add("Center", panel2);
       public void actionPerformed (ActionEvent e){
          if (e.getSource() == start){
             cont.remove(panel2);
             cont.add("Center", panel3);
             validate();
          if (e.getSource() == submit1){
             cont.remove(panel3);
             cont.add("Center", panel4);
             validate();
             repaint();
          if (e.getSource() == submit2){
             cont.remove(panel4);
             cont.add("Center", panel3);
             validate();
             repaint();
      public static void main(String[]args){
         TwoPanels m = new TwoPanels();
         m.setSize(240, 180);
         m.setLocation(150, 200);
         m.setDefaultCloseOperation( EXIT_ON_CLOSE );
         m.setVisible(true);
    }

  • Multiple JFrames

    Hi. I have a situation where I need to display multiple JFrames. I have an application with a control panel that has the ability to launch another application (via a JButton). The only problem is, the only handle I have to that other application is another JButton, so I end up with something that looks like:
    JButton launchButton = new JButton();
    launchButton.setAction(new AbstractAction() {
        public void actionPerformed(ActionEvent e) {
            //SomeOtherApp extends JFrame
            SomeOtherApp app = new SomeOtherApp();
            app.setVisible(true); 
    });This works, but I run into all sorts of repainting problems. Since SomeOtherApp is so large, it seems to be hogging the Event-Dispatching Thread, and the app never repaints my control panel JFrame correctly. Any thoughts on how to improve this performance?
    Thanks,
    Jeff

    Only one frame ever has focus at a time and therefore only one frame ever responds to events at a time. So neither frame should be affecting the other.

  • How can I from one panel access elements on another panel ?

    I have a JFrame with 2 panels and a JMenu
    I am struggling to find a way how I can access JMenu from one of my panels ...
    Also how can I access elements on one panel from other panel ? At the moment I am passing a reference from one panel to other in the constructor but it's only one way communication now ... I can't go from second panel to first ...
    I am sure there must be an elegant way to solve this problem.
    Many thanks.
    Sergei

    OK I'll give you more details...
    I have a JFrame with multiple panels...
    Also I have a JMenu on JFrame...
    Now when user clicks a button on one of the panels I need to disable a menu item ... this is issue#1
    issue#2 is:
    how do I get two panels (they are separate classes) talking to each other ??? At the moment when I initialize a panel#2 from my Frame I pass to it reference to panel#1 and in this way panel#2 can talk to panel#1 but panel#1 can't talk to panel#2 ...
    I know there must be an elegant way to solve this problem... and I don't like having 2 classes tightly coupled like this... Can I use some kind of nice OO trick for this ? I was reading about custom listeners but I don't want to go crazy on this as I don't have time... actualy I've got only 1 day to solve this issue so any help will be greatly appreciated.
    Many thanks
    Sergei

  • How Do I Group Multiple Disks as One Album?

    I've got the latest iTunes update, 11.0.4, and as with the update before it, I'm supposed to be able to group multiple disks as one album, but I can't figure out how, and can't find any directions at Apple.
    I've lately begun ripping my large collection of symphonies and operas on CD into iTunes. Operas especially almost always come on two, three, or even four CD's, BUT IT'S ALL THE SAME OPERA, and the CD's come in the same boxed set. On top of that, there really aren't any "tracks" in an opera; the plot and the music unroll seamlessly from beginning to end (that sometimes takes 5 or 6 hours, which goes with the operatic territory).
    On my CD player, I'm used to a pause between disks, but now that I've figured out how to get the "tracks" on each CD to play in order on iTunes (not so intuitive), I'd like to be able to go from the last "track" on Disk 1 to the first track on Disk 2 without interruption, since the technology should be able to support that option.
    In the INFO box, I've tried keeping "1 of 3," "2 of 3," "3 of 3." No joy. So I've tried erasing the first element, 1, 2, 3, and just leaving the total number of disks. Again, no joy.
    Since the album name is often filled in with something like "Carmen [Disk 1]" for example, and since Albums should have exactly the same name so that iTunes can figure out that in fact, they belong to the same work, I've tried deleting '[Disk 1]" etc. on all 3, leaving just "Carmen" in the appropriate space on the INFO panel for each of the 3 disks. Doesn't work.
    Has anyone else been afflicted with the same problem?
    Has anyone got a solution?

    Have you seen this helpful article:
    Grouping tracks into albums:
    http://samsoft.org.uk/iTunes/grouping.asp
    In the INFO box, I've tried keeping "1 of 3," "2 of 3," "3 of 3."
    That is correct.  Don't   erase the first element, 1, 2, 3, that should not matter.
    Since the album name is often filled in with something like "Carmen [Disk 1]" for example, and since Albums should have exactly the same name so that iTunes can figure out that in fact, they belong to the same work, I've tried deleting '[Disk 1]" etc. on all 3, leaving just "Carmen" in the appropriate space on the INFO panel for each of the 3 disks.
    Also correct.  Also chec, if the  "Sort album name" is the same.
    Do the artists differ on the tracks?
    Then set the "Album Artist" on all CDs to the same name (Various Artists), also check, if the album sort artists names differ.

  • Dreamweaver Panels - Only one panel visible at a time, others get obscured even with Always On Top.

    I have a problem with my Dreamweaver MX, and it is that I can only see one panel at a time, any other open panels get obscured. For example, with the work space maximized, and having the properties and behaviors panels open, I can only see one of the panels at the same time. If I click on any area of the work space each open panel will display and with the next click the other will display. If I make the work space smaller then the whole area of my screen, and move any open panels outside of the Dreamweaver work space, only then they will stay visible. I know this is not normal behavior, because I used to be able to see all the open panels simultaneously, with the work space maximized to use all the screen area. I went to Preferences> Panels> Always On Top, and all the checkmarks are still set, so as to keep all panels on top at all times, but this does no longer be the case. Can someone tell me what happened here, and how I can get back to being able to see all the open panels? BTW, I tried installing older version of Dreamweaver 4, and the same thing happens to both installed versions. This is extremely annoying!
    Thanks. -Al.

    Since I upgraded to Firefox 19 from 18.0.2, on my Windows XP (SP3) laptop, I, too, can no longer open a new window. File-->New Window does nothing; also can no longer tear off a tab and open it in a new window (it stays where it is). Also, if I right-click on a tab and select Move to New Window, nothing happens. All of these worked fine in FF 18.0.2. All of these work fine with FF 19 on Windows 7. Only an issue on my XP laptop.
    After trying to open a new window, and not seeing the new window come up (and yes, I waited a long time), I decided to close my current window, which had multiple tabs open. Instead of just closing, it pops up the message reminding me that I'm about to close all those tabs. If I say close, and then go into the Task Manager, the Firefox application has disappeared (as expected), but the firefox (and plug-in container) processes are still running. So I have to manually kill the Firefox process to get it to quit. it's as if it thinks there is another Window open (the one I tried to open but never appeared). This happens every single time! I've restarted my laptop, and that does not resolve the problem.
    Is there a way to downgrade back to v 18.0.2 until this is fixed?

  • Multiple screens in one frame

    Hi all,
    I'd like to know how to be able to display multiple screens within one frame. Depending on the choice made on the first screen, the second screen should be either "View Default" or "Modify Default." The modifying will involve a number of other screens.
    One idea is to group by Panel and control panels. Any better idea?
    Regards,
    Omer

    Do you mean multiple displays in one frame? If so, you have several options. With JTabbedPane you could dynamically add new views to the frame, with the disadvantage of only being able to see one at a time. JSplitPane allows you to nest various views within one frame, though has the disadvantage of having extremely complex display logic when several split panes are displayed at the same time, and of displaying all displayed panes simultaneously.
    Perhaps the best possibility is to use JDesktopPane, within which you can insert as many JInternalFrames as you want.

  • Move multiple events into one album

    Hi,
    I am trying to tidy up our photos on iPhoto.
    Is there a fast, easy way to move multiple 'Events' into one 'Folder'
    For example:
    We have all of our photos from our honeymoon in Europe saved as seperate 'Events' According to the location. It was a 3 month trip so there are a lot of 'Events' or locations. Is there a way i can select all of them and put them into the Honeymoon 'folder' without them all merging into one big album?
    I want to keep them as separate events within the folder so we can remember where they were taken.
    I have been trying to drag the 'Event' over to the Honeymoon 'Folder' but instead of just going straight in there it creates a new unnamed folder on the left panel, and then i have to drag the event up to the honeymoon folder and delete the unnamed folder. It is proving rather time consuming and i have over 12000 photos to sort.
    Any help would be great. Simple terms please!!
    Thanks

    lf you drag an event onto a folder in the left hand pane the photos in that Event will be added to a new album in that folder with the same name as the Event. .
    OT

  • Controlling multiple instruments with one VI

    I have 5 instruments that I need to control simutaneously.  Right now, each is controlled separately by its own VI, all of which run in LabVIEW 7.1.  I would like to consolidate control into one panel instead of 5.  I have seen examples of libraries that contain multiple sub-VIs controlled by a main VI, but I cannot figure out how data is passed between them, or how to create a library from my existing VIs.  Is there a way to do this? 

    For a simplistic answer, you just have to place your existing VIs into a new top level main VI. In order to pass data from a subVI to a mian, you wire the controls/indicators on the subVI to the subVI's connector pane. These is really basic LabVIEw knowledge and if you don't know how to do this, then you should probably spend some time learning LabVIEW basics. A great starting point is at http://www.ni.com/academic/lv_training/how_learn_lv.htm.
    With 7.1, a library is an llb file and you really don't need to use one of these. They can be handy for distributing an application but should not be used during development. Just keep your VIs in folders.

  • Controlling multiple videos with one set of controls

    I'm currently working on a project that allows the user to view multiple videos at one time. The videos will be exactly the same length and video format/type. I'd like to let the user use just one set of controls to view each video. Is this possible? If so, does anyone have any code samples?
    I also want the video to not start when the application starts. I've got that done, but I'd also like the first panel of the video to be displayed. How can I do that?
    Thanks!

    PS, I'd also prefer for the controls to be detatched from any of the viewers, if possible. Thanks!

  • Wireless Network Management with Multiple SSIDs in one Wireless Profile

    Could anybody explain me about how Multiple SSIDs in one Wireless Network Name (Network Profile) ? Configuration will be pushed to Windows 7 Pro from Wins Server 2008 R2.
    Objective: Multiple office locations will have different SSIDs and when the laptop user travels one location to another, he/she could connect to wireless networks at any offices without any configuration change but utilizing "Automatically use my Windows
    logon name and password (and domain if any.)" setting in EAP MSCHAPv2 properties. 
    Network Name: Enterprise
    SSIDS: SFO-WIFI, LAX-WIFI,CHI-WIFI,NYC-WIFI,
    Network Type:Access Point
    Security Type: WPA2-Enterprise
    Encryption Type: AES
    Network Authentication Method: Microsoft:Protect EAP(PEAP)
    My question is: (1) Will Windows try all the SSIDs in order to get connected to the Wireless Network at the office? (Let's say, user is in NYC, but will Windows try to find SFO-WIFI SSID first, wait until time out, retry?, and moves on to LAS-WIFI SSID,
    wait until time out, retry?, and moves on to CHI-WIFI and finally tries NYC-WIFI SSID and found the SSID in the beacon from Access Point and authenticates through RADIUS?
    (2) If the answer is YES, what is the waiting time/timeout setting for one SSID before moves on to another?
    (3) If the answer is NO, what is the process to get user connected to NYC-WIFI SSID when he/she is in NYC office within the range of that SSID?

    Hello Ninjago_2224,
    About the multiple office location have different SSIDs, does the location A has the signal used in
    location D?
    Please go to Control Panel\Network and Internet\Network and Sharing Center
    , and then click Manage wireless networks.
    The windows will try to connect to these networks in the order listed.
    Please check if the four SSID pushed by Windows Server 2008 is listed as mentioned above.
    If the location A have the location D SSID and the location D SSID has higher priority, the Windows will connect to
    location D SSID.
    So about the question 1, the Windows will try the SSID in order.
    About the question 2, I can’t find the accurate time that test one SSID and move to another. But based on my test, it is very fast.
    For more information, please take a look at the following article.
    http://www.howtogeek.com/howto/27067/change-wireless-network-priority-to-make-windows-7-choose-the-right-network-first/
    Please note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.
    Best regards,
    Fangzhou CHEN
    Fangzhou CHEN
    TechNet Community Support

Maybe you are looking for

  • New PC with Windows 8, can't find "eject" icon to safely disconnect

    I recently purchased a new laptop with Windows 8.  Today is the first day I've imade and iTunes purchase. I'm finished and I want to safely disconnect.  My iPod Classic displays "Connected Eject before disconnecting". I can't find the little "eject"

  • Dissappearing SuperDrive in G4 MDD

    I have a Power Mac G4 MDD with factory-installed SuperDrive and it's playing hide-and-seek. The SuperDrive dissappears randomly, System Profiler reports nothing but a hard drive. I have checked and double-checked cables (it's in cable-select mode) an

  • JSP Debbuging -Error: 'class' or 'interface' expected-

    Hi, Does anybody know why am I getting the following error when trying to either debug or run a JSP? Error: 'class' or 'interface' expected This happens with JDeveloper 9.0.2.829 It was running just OK, when running from the Navigator Panel (Right cl

  • Use Enum to keep config attributes.

    Hi Guys, There´s some restrictions to keep config atributes on enum??? Thanks !! I have an xml and use the folow code to retrieve data, and i think to replace this with a enum ... public static Map loadFolderConfig()     if (xmlConfig != null)      

  • Error 1321 when updating Adobe Acrobat Pro even if profile has admin rights and parent folder has full access privileges.

    Error 1321 when updating Adobe Acrobat Pro even if profile has admin rights and parent folder has full access privileges. Exact error below: error 1321: the installer has insufficient privileges to modify the file C:\Program Files (x86)\Adobe\Acrobat