JFrame location help

Hi, I have created a set of codes using JFrame. once I click on a button, it will show a new frame. Now I have a problem is that the frames overlap each other. How do I set the location say Frame A should appear in the top of the monitor screen Than frame B all the bottom of the monitor screen?

check javadoc....
JFrame have setLocation(int, int) method

Similar Messages

  • How can I change the Jframe Java help Icon

    How can I change then Jframe Java help Icon?.
    I am using then HelpSet class and HelpBroker.
    I want to change the java help icon
    Any Idea? thanks. ...

    It can be done, but it's ugly...
    Add in a listener to your topmost JFrame to sense when the focus is lost, since this happens when a help window comes up. When the focus leaves the main window, check all the windows that are up to see if one is a help window. If so, this will give you a reference to the help window and you can drill down to change what you want.
    Here's an example that changes the icon and removes the borders from the javahelp buttons.
    WindowListener wndCloser = new WindowAdapter() {
              //A necessarily roundabout method to affect
              //look and feel aspects of the javahelp viewer.
              //(there is no way to get at these components directly.)
              //When the main frame loses focus, it may be because
              //the help viewer was brought up. Look through all
              //the current frames to see if one is a help viewer.
              //If it is, change the look of the help viewer
              //to what we want.
              Frame m_helpFrame = null;
              public void windowDeactivated(WindowEvent e) {
              if (m_helpFrame != null)
                   return;
              Frame[] frames = getFrames();
              for (int k = 0; k < frames.length; k++) {
                   if (!(frames[k] instanceof JFrame))
                   continue;
                   JFrame jf = (JFrame)frames[k];
                   if (jf.getContentPane().getComponentCount()==0)
                   continue;
                   Component c = jf.getContentPane().
                   getComponent(0);
                   if (c == null || !(c instanceof JHelp))
                   continue;
                   m_helpFrame = jf;
                   //now that we know the Frame, we can change the title icon
                   final Image image2 = <your icon here>
                   m_helpFrame.setIconImage(image2);
                   JHelp jh = (JHelp)c;
                   for (int s=0; s<jh.getComponentCount(); s++) {
                   c = jh.getComponent(s);
                   if (c == null || !(c instanceof JToolBar))
                        continue;
                   JToolBar jtb = (JToolBar)c;
                   //now that we've accessed the toolbar, we can
                   //modify the look of the buttons.
                   for(int i=0; i<jtb.getComponentCount(); i++) {
                        Component comp = jtb.getComponentAtIndex(i);
                        if(comp instanceof JButton) {
                        JButton button = (JButton)comp;
                        button.setBorder(null);

  • How do I stop this please You are not sharing your location. Sharing your location helps provide searches that are geographicaly closer to you

    When I go to this website it's giving me this
    You are not sharing your location. Sharing your location helps provide searches that are geographicaly closer to you
    This pops up how do I stop it there is NO x
    Thank you

    You can set the default setting for Share Location for all sites on the about:permissions page.
    *https://support.mozilla.org/kb/how-do-i-manage-website-permissions
    The about: protocol is used to access special built-in pages.<br />
    You can open built-in about: pages via the location bar like you open a web page and in most cases you see a special orange Firefox icon on the location bar.

  • Song can not be used because Original file can not be located  - HELP

    Hi - Newbie here and I have run into and error and don't know how to fix it. When I try to play a large number of songs from Itunes I get the following message. "The Song (NAME) could not be used because the original file could not be found. Would you like to locate it?" I have no idea where the orginal files are and I am not sure how to fix this error. Could someone please help me out! Thanks - KAggie

    This happens if the files are no longer where iTunes expects to find them. Possible causes are that you or some third party tool has moved, renamed or deleted the files, or that the drive they live on has had a change of drive letter. It is also possible that iTunes has changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout, or vice-versa, and so is looking in slightly the wrong place.
    Select a track with an exclamation mark, use Ctrl-I to get info, then cancel when asked to try to locate the track. Look on the summary tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, or a drive letter has changed, it should be possible to reverse the actions.
    Alternatively, as long as you can find a location holding the missing files, then you should be able to use my FindTracks script to reconnect them to iTunes.
    If the files are nowhere to be found on your computer, but exist on a device, see  Recover your iTunes library from your iPod or iOS device.
    While deleting & reimporting works when the media can be found the process will delete user playlists, ratings, play counts, date added information and any other metadata not stored in tags.
    tt2

  • PSE 7 confusion about folder location, help needed

    Here's some background: I'm using PhotoShop Elements 7 on Win XP.  I have an external firewire hard drive I use for overflow/backups.  Originally, this showed up as a K: drive on my system.
    I added a RAID controller and two more drives to stripe as a single drive for temp space rendering movies.  This ended up as a K: drive and the external moved to L:  However, when I did this there were some pictures from my catalog that I had on the external drive.  I have used File > reconnect missing files to handle the moves, but PSE is still confused (very).
    PSE has started to mix up the RAID (K:) and external (L:) content.  If I move a set of pictures (e.g. a folder of them) onto the external drive (L:) via drag and drop in the folder location view, the folder will show up empty on the L: heirarchy, but will show up as a gray folder icon in the K: RAID drive hierarchy.  If I open up windows explorer, the RAID drive will appear empty.  In other cases (I'm not sure when/how yet), pictures physically end up on the RAID drive itself instead of the external.  I have uninstalled both the external drive and the RAID drive and reinstalled them both, but they are still getting confused in the folder view by PSE.  I've also tried moving content outside of PSE and just reconnecting missing files, but it still wants to put things under the K: RAID drive instead of the external L:.
    I've searched everywhere I can think of for a description of what gray folder icons in the folder location view means and can find none.  I'm not sure how to convince PSE that there's nothing on the RAID K: drive and it shouldn't try to connect the two.  Any suggestions?
    Thanks,
    Jim

    Thank you!  I ran psedbtool and the output shows the catalog has the wrong drive letter for the L: drive.
    Is there a way to make PSE forget about the K: and L: drives that it is so confused about so that it can relearn of their existence?  If I use the drive letter reassignment to fix PSE, it will break other apps that are now dependent on the current drive letter assignments.  I've tried removing all files from the L: drive, but it's still remembered as part of the catalog.
    Thanks,
    Jim
    psedbtool version 1.07
    Opening catalog C:\Documents and Settings\All Users\Application Data\Adobe\Photoshop Elements\Catalogs\Moms pics\catalog.pse7db
    Photoshop Elements version:      7
    Total files               :   4833
    Total files missing       :      0
    Total files offline       :    278
    Total files wrong volume  :      0
    ****** Volumes with warnings: 1
    PSE Volume Table
    Path used by PSE        : F:
    Type                    : builtin_drive
    Status                  : online
    Total files             : 0
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : MEDIA
    Serial                  : 1C2F-9805
    Drive_path_if_builtin   : F:
    Id                      : 32520
    Path used by PSE        : M:
    Type                    : builtin_drive
    Status                  : online
    Total files             : 938
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : FreeAgent Drive
    Serial                  : 7830-2970
    Drive_path_if_builtin   : M:
    Id                      : 93626
    Path used by PSE        : E:
    Type                    : builtin_drive
    Status                  : online
    Total files             : 0
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : GAMES
    Serial                  : 025A-4B70
    Drive_path_if_builtin   : E:
    Id                      : 93625
    Path used by PSE        : L:
    Type                    : builtin_drive
    Status                  : online
    Total files             : 114
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : FreeAgent Drive
    Serial                  : 60AE-A816
    Drive_path_if_builtin   : K:
    Id                      : 31354
    ***** WARNING *****     : Wrong drive letter in catalog
    Path used by PSE        : \\dmzhost\media
    Type                    : network_drive
    Status                  : offline
    Total files             : 278
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : //dmzhost/media
    Serial                  : //dmzhost/media
    Drive_path_if_builtin   :
    Id                      : 26948
    Path used by PSE        : J:
    Type                    : builtin_drive
    Status                  : online
    Total files             : 3503
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : MEDIA2
    Serial                  : BAC0-B5A3
    Drive_path_if_builtin   : J:
    Id                      : 108
    Path used by PSE        : C:\Documents and Settings\All Users\Application Data\Adobe\Photoshop Elements\Catalogs\Moms pics
    Type                    : database_relative_drive
    Status                  : online
    Total files             : 0
    Total files missing     : 0
    Total files wrong volume: 0
    Description             : database relative
    Serial                  : amoc:database_relative_volume
    Drive_path_if_builtin   :
    Id                      : 2
    Windows Drives
    Drive  Type             Serial     Path
    A:     removable_drive  0000-0000 
    C:     builtin_drive    9088-07F9 
    D:     builtin_drive    F408-1CB0 
    E:     builtin_drive    025A-4B70 
    F:     builtin_drive    1C2F-9805 
    G:     builtin_drive    242D-15ED 
    H:     readonly_drive   0000-0000 
    I:     builtin_drive    427D-3F6B 
    J:     builtin_drive    BAC0-B5A3 
    K:     builtin_drive    64E8-9846 
    L:     builtin_drive    60AE-A816 
    M:     builtin_drive    7830-2970
    Thanks so much for your help!
    Jim

  • Stolen Iphone locate help

    Hi all, my g/f iphone was stolen on the weekend and we are trying to locate it. I have contacted several people and they advise it can't be tracked. It wasn't logged with findme services or anything but I do have the IMEI number? The phone had some very important family photos and video on and we really want to find it
    Does anyone have any information that could help....please?

    Apple will not assist in tracking the device.
    Unless you had MobileMe with the FindMyiPhone enabled, you're pretty much out of luck.
    There is a reason why the iPhone should be synced and backed up regularly and you should not use it for storage of important items. It is portable and as such, easily misplaced or stolen.
    I am sorry that her phone got stolen, but this is an important lesson for you both to learn. Sync and back up your iPhone regularly and do NOT use is as the sole storage device for important materials. At that point, it's your decision whether or not to invest in MobileMe or similar solutions for tracking stolen/misplaced devices.

  • I have lost my iphone.  How do I open the locator help for this?

    I have lost my iphone,  How do I open the locator to help find it?

    Go to icloud.com/find from your computer, sign into your iCloud account, then click on Devices on the top left, as explained here: http://help.apple.com/icloud/#mmfc0f2442.

  • Changing App Store Location - Help needed

    Hi, I have just been to USA and the App Store changed to the US and now I am back I am unable to update or download apps on my ipad as it says I have to switch to UK store.  I have tried the settings itunes and apps but I it states that it is UK store and to change i need to spend remaining £s from a gift card but unable to purchase anything as it is US store not UK, Any help will be appreciated.

    Change App Store
    1. Tap "Settings"
    2. Tap "iTunes & App Stores"
    3. Tap on your Apple ID
    4.Tap "View Apple ID"
    5. Enter your user name and password.
    6. Tap "Country/Region."
    7. Tap "Change Country/Region"
    8. Select the region where you are located.
    9. Tap "Done".

  • Problem with JFrame , please help !

    hello , all !
    I define a JFrame1 as ancestor
    I set the JFrame's contentPane Layout to borderLayout ,
    and add some component in south , north , and add a menu , in its constructor
    then I define a new JFrame2 inherit from JFrame1, I also add a Jpanel component
    to contentPane center in its constructor !
    but something a wrong , I can't see the Jpanel , only see the components which add in JFrame1?
    this is why ?
    thanks
    /* source code */
    public class JFrame1{
    public JFrame1(){
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    private void jbInit() throws Exception {
    contentPane = (JPanel) this.getContentPane();
    contentPane.setLayout(borderLayout1);
    statusBar.setBorder(BorderFactory.createEtchedBorder());
    statusBar.setText("Hello , Young follow! ");
    contentPane.add(statusBar, BorderLayout.SOUTH);
    toolbar = new Toolbar_DataEntry(this);
    contentPane.add(toolbar, BorderLayout.NORTH);
    menubar = new Menu_DataEntry(this);
    this.setJMenuBar(menubar);
    public class JFrame2 extends JFrame1 {
    public JFrame2() {
    try {
    jbInit();
    catch(Exception e) {
    e.printStackTrace();
    /**Component initialization*/
    private void jbInit() throws Exception {
    contentPane = (JPanel) this.getContentPane();
    JPanel bodyPane = new JPanel();
    bodyPane.setDataModule(queryDataSet1);
    queryDataSet1.Opendatabase();
    bodyPane.setBorder(null);
    this.setTitle("Frame Title");
    bodyPane.setBounds(new Rectangle(4, 5, 427, 114));
    contentPane.setPreferredSize(bodyPane.getPreferredSize());
    contentPane.setMinimumSize(bodyPane.getMinimumSize());
    Frame_Resize();

    The problem is that the constructor for JFrame2 does not automatically call the constructor for JFrame1. Therefore the JFrame1 constructor never gets called.
    You must do this yourself with the super() method.
    public JFrame2() {
    super();
    try {
    jbinit();
    catch( Exception e )
    e.printStackTrace();
    Remember that this rule applies to all descendent classes.

  • Reporting Services Point - installation location help

    I have my SCCM 2012 environment role(s) split up. Granted other roles exist in each location but in a nut shell it's like this:
    Server1 - SCCM primary site with MP
    Server2 - SCCM DP, software update point, etc
    Server3 - Pure DB server hosting multiple other systems DB's and the SCCM DB
    I do not want to install the "Reporting Services Point" on the DB server, rather have it installed on Server1, aka the primary MP site server.
    Do I need to do or have anything special installed on Server1 to use it as the Reporting Services Point? I am having a hard time finding the requirements needed for just the Reporting Services Point role.

    try these links
    http://technet.microsoft.com/en-ca/library/gg712698.aspx
    http://social.technet.microsoft.com/wiki/contents/articles/15475.how-to-successfully-install-reporting-services-point-role-in-sccm-2012-sp1.aspx
    I prefer having the SQL server (DB) and SSRS on the primary site server, but that is a matter of preference / simplicity.

  • I can't get icloud to show up on my computer (windows7 pc) to get photo stream to work....so my photos are streaming to an unknown location HELP!!!

    I have followed all the directions online about going to control panel and then Network and sharing but icloud isnt there? I have searched my computer for it and nothing... Someone please help..... This is a brand new laptop so it may be something really simple because I didnt have this trouble on my last computer. Thanks for your time.
    Ashley

    Welcome to Apple Communities
    First, install iCloud Control Panel

  • In need of serious JFrame/Stringbuffer Help!

    Basicly, it opens a GUI with a few buttons like "previous, last, first, next, add, exit"
    and i take 3 inputs from the user...from the JTextField. Those values are put in a file and are supposed to be read (i'm assuming that i use stringtokenizer) but right now i'm using stringbuffer to write to a file. I can't get it to write to the next line though.. it writes next to it..
    I'm just hoping that i'm using the correct functions to do this job. Feedback greatly appreciated, i'm really worried about the stringbuffer and having it write the way it should. I didn't do the reading yet.
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.io.*;
    public class BookMaintenance extends JFrame
         private JTextField author;
         private JTextField title;
         private JTextField publisher;
         private JButton add;
         private JButton exit;
         private JButton first;
         private JButton previous;
         private JButton next;
         private JButton last;
         private Container container;
              public BookMaintenance()
                   author = new JTextField(10);
                   title = new JTextField(10);
                   publisher = new JTextField(10);
                   add = new JButton("Add");
                   exit = new JButton("Exit");
                   first = new JButton("First");
                   previous = new JButton("Prev");
                   next = new JButton("Next");
                   last = new JButton("Last");
                   last.setSize(30,10);
                   JPanel jPanel1 = new JPanel();
                   jPanel1.add(new JLabel("Title: "));
                   jPanel1.add(title);
                   JPanel jPanel2 = new JPanel();
                   jPanel2.add(new JLabel("Author: "));
                   jPanel2.add(author);
                   JPanel jPanel3 = new JPanel();
                   jPanel3.add(new JLabel("Publisher: "));
                   jPanel3.add(publisher);
                   JPanel jPanel4 = new JPanel();
                   jPanel4.add(first);
                   jPanel4.add(next);
                   jPanel4.add(previous);
                   jPanel4.add(last);
                   JPanel jPanel5 = new JPanel();
                   jPanel5.add(add);
                   jPanel5.add(exit);
                   container = this.getContentPane();
                   GridLayout gLayout = new GridLayout(5,1);
                   container.setLayout(gLayout);
                   container.add(jPanel1);
                   container.add(jPanel2);
                   container.add(jPanel3);
                   container.add(jPanel4);
                   container.add(jPanel5);     
                   ActionListener actionListener = new ButtonListener();
                   first.addActionListener(actionListener);
                   next.addActionListener(actionListener);
                   previous.addActionListener(actionListener);
                   last.addActionListener(actionListener);
                   add.addActionListener(actionListener);
                   exit.addActionListener(actionListener);
    class ButtonListener implements ActionListener
             public void actionPerformed(ActionEvent event)
                 if(event.getSource() == add)
                             StringBuffer stringBuffer = new StringBuffer();
                             stringBuffer.append(title.getText());
                             stringBuffer.append(" ");
                             stringBuffer.append(author.getText());
                             stringBuffer.append(" ");
                             stringBuffer.append(publisher.getText());
                             stringBuffer.append(" ' ");
                             RandomAccessFile randomAccessFile = null;
                                    try
                                    randomAccessFile = new RandomAccessFile("file.txt","rw");
                                            System.out.println(stringBuffer.toString());
                                    randomAccessFile.seek(randomAccessFile.length()); 
                                    randomAccessFile.writeBytes(stringBuffer.toString() );
                                    randomAccessFile.close();
                                            catch(IOException ioe){}
              public static void main(String args[])
            BookMaintenance frame = new BookMaintenance();
            frame.setTitle("Book Maintenance");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(400, 250);
            frame.setVisible(true);
          //  frame.setResizable(false);
    }

    I have, I've tried many different ways.. but it's hard because with your example, you added it by itself.. and i don't know how to change it to take the input from the user instead of what you gave it.
    Lookin at your code.. how would i replace this with input from the user? like add the title, author, publisher in there?
              items = new ArrayList<InventoryItem>();
              items.add(new InventoryItem("Java Programming", "A book about java programming."));
              items.add(new InventoryItem("Monkey Soup", "A delicious Dinner Meal."));
              items.add(new InventoryItem("Red", "My Favorite Color"));
              items.add(new InventoryItem("Light Bulb", "An incandescent miracle."));
              items.add(new InventoryItem("Caleb Payne", "Your god."));
              items.add(new InventoryItem("You", "Caleb's bitch."));Message was edited by:
    DenisK

  • Could not access network location :. help please!

    I cannot get APPLE MOBILE DEVICE SUPPORT  uninstalled from my system,when I try to remove it from add/remove programs this is what I get:
    Could not access network location :.
    All other apple Itunes products I can remove,but not AMDS.
    Also when I try to install a fresh copy of itunes it cannot be completed because of the aforementioned issue crops up when trying to install.

    That's suggesting damage to the installation database in the AppleMobileDeviceSupport.msi (or related installation configuration information), sheena.
    Unfortunately, this sort of trouble has gotten more complicated to deal with ever since Microsoft pulled the Windows Installer CleanUp utility from their Download Center on June 25 2010. First we have to find a copy of the utility.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for at least version 3.0 of the Windows Installer CleanUp utility. (The results from mydigitallife and Major Geeks are worth checking.)
    After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any Apple Mobile Device Support entries and click "Remove".
    Quit out of CleanUp. Restart the PC, and try another iTunes install. Does it go through properly this time?

  • Oracle inventory location Help

    I am facing some issues with oracle inventory locatoin on a 2 node rac setup. The ORACLE_BASE in my .bash_profile is pointing to /u01/ mount point - which is a NFS mounted volume. clusterware installation went sucesful and now when i am trying to install 11g - it says, oracle inventory can not be on a shared volume and quits the installation.
    My oracle home directory is \home\oracle\.
    system has three mounted directories: /u01/ - /u02/ - /u03/.
    /u01/app/oracle/crs - clusterware
    /u01/app/oracle/product/11g/ - plan on installaing oracle 11g
    /etc/oraInst.log - has the inventory location.
    can somebody please suggest - what options do i have here? any input will be greatly appreciated.
    many thanks,
    shilpa

    Oracle Inventory can not store on Share location.
    http://kevinclosson.wordpress.com/2007/07/19/oracle11g-oracle-inventory-on-shared-storage-dont-bother-trying-to-install-11g-rac-that-way/

  • Executable Description Location - Help Needed

    Good Afternoon,
    I was wondering if someone knew of an article or location on the net where I could locate what the Executable Files in \oracle\product\10.2.0\db_1\bin do? I have a nice long list here of all of our current .exe files in that location but would like to know what each of them does. The reason I am requesting such information is we are about to dip into adjusting the stack memory on several of our executables and we would like to review each one before making any changes.

    user10953246 wrote:
    Good Afternoon,
    I was wondering if someone knew of an article or location on the net where I could locate what the Executable Files in \oracle\product\10.2.0\db_1\bin do? I have a nice long list here of all of our current .exe files in that location but would like to know what each of them does. The reason I am requesting such information is we are about to dip into adjusting the stack memory on several of our executables and we would like to review each one before making any changes.Well, even by searching over Google, details of few executables would be given to you but the reason that you have mentioned for knowing this detail i.e. adjusting the stack memory for them, I would REALLY suggest that you include OSS while doing this as in normal conditions, adjusting the stack memory of executables from their defaults is not recommended. If OSS validates this act of yours than only you should go for it, not by yourself.
    Just my 2 cents!
    Aman....

Maybe you are looking for

  • VERY URGENT :  BW Iview not working from EP

    Pls note : Everything works OK when we use a HTTP version of BroadVision. Dear Portal Gurus, <b>What I want to do : ====================</b> I want to integrate a BW Report into EP. This BW report has a first page with drop down boxes in it.If we cli

  • Airport Extreme & Samsung SMART 3D TV UE46ES8080

    Hey Guys! I have a Samsung 3D LED TV (UE46ES8080) and i tried to connect it to my Aiport Extreme. Unfortunately, that didn't work. Is there anybody that can help? Thanks!

  • Migrate to DFSR - in MS Windows 2008 R2

    hello, We are trying to migrate to DFSR. I am following the step as per the guide https://blogs.technet.com/b/qzaidi/archive/2012/01/16/quickly-explained-migrate-your-sysvol-replication-from-frs-to-dfsr.aspx I get this error at both step 1 and 8:

  • Edit Show Pop-Up Menu

    I'm using Dreamweaver's Show Pop-Up Menu Behavior. I have a sample drop down of 3 links. I'd like to give each of the drop down cell's a unique rollover color. Can this be done somehow? If so, what javascript do I have to edit?

  • Mail for Exchange - special characters (umlaut) in...

    Hi, I have several usernames with german umlaut-characters (ü, ä, ö, ß). These usernames are not able to logon within Mail for Exchange. Is there any hint? M4E 1.06 E60 3.0633.09.04