Can't get JInternalFrame to be selected by default

For some reason the JInternalFrame isn't being selected as default:
//Create a new internal frame.
protected void newJobFrame() {
        EditJobInformationInternalFrame frame = new EditJobInformationInternalFrame();
        frame.setVisible(true);
        /* Doesn't work
        try {
                frame.setSelected(true);
        } catch (java.beans.PropertyVetoException e) {}
        mainDesktop.add(frame);
} // createFrame()
//Create a new internal frame.
protected void logonFrame() {
        LogonInternalFrame frame = new LogonInternalFrame();
        frame.setVisible(true);
        mainDesktop.add(frame);
        /* Doesn't work here either
        try {
                frame.setSelected(true);
        } catch (java.beans.PropertyVetoException e) {}

The following code sequence copied from my application works for me.
public static ImageIcon frameIcon;
frameIcon = new ImageIcon(getClass().getResource("images/smallwim.gif")); // 16X16
Employee frame = new Employee();
frame.setVisible(true);
frame.setFrameIcon(frameIcon); // set frame icon
desktop.add(frame); // add to desktop
frame.setRequestFocusEnabled(true);
try {frame.setSelected(true);}
catch (java.beans.PropertyVetoException e) {} // ignore
frame.toFront();rykk

Similar Messages

  • Can i get multiple records if selection screen is 900 using PROVIDE

    Hi All,
    Iam using following statement for fetching MULTIPLE records from infotype 0008. In Attributes if i declare LDB as pnp and selection screen as 900, then iam not getting any records.
    Instead of th selection screen 900 is empty. then records will getting properly.
    How can i get multiple records if selection screen is 900?
      PROVIDE * FROM p0008
                    between pn-begda and pn-endda.

    Hi Ranjith
    You can use
    PYBEGDA and PYENDDA instead of PN-BEGDA AND PN-ENDDA.
    Regards
    Muneer.VK

  • Where can I get information about Oracle Selective Audit?

    Hi all.
    I would like to know where can I get information about Oracle Selective Audit. Is included in some package? Resources it needs, manuals, etc. I don't find much information.
    We have Oracle 9i.
    Thanks

    I need information about the Oracle Selective Audit solution. It works on oracle 9i? Requirements, how to get and install it. Is this package useful for report generation, etc.
    Thanks for the link.

  • How can I get width that multiple selected items?

    How can I get width that multiple selected items? (Not grouped.)
    //---------- source code ----------
    var mm = 2.83464566929134 //unit conversion. (point->milimeter)
    var W = docRef.selection[0].width/mm;
    alert(W);
    //---------- source code ----------

    That's right Carlos
    @kimDino8,
    my script in Carlos link creates a green rectangle around the selected items. If you don't need this rectangle than you can remove this lines:
    var newRGBColor = new RGBColor();
    newRGBColor.red = 0;
    newRGBColor.green = 255;
    newRGBColor.blue = 0;
    and replace this:
    var aRectangle = aDoc.pathItems.rectangle(vBounds_Ob, vBounds_Li, vBounds_Re - vBounds_Li, vBounds_Ob - vBounds_Un);
    aRectangle.strokeColor = newRGBColor;
    aRectangle.strokeWidth= 2;
    aRectangle.filled = false;
    aRectangle.stroked = true;
    aDoc.selection = null;
    with this:
    var mmFactor = 2.83464567;
    alert("width = "+ (vBounds_Re - vBounds_Li)/mmFactor);
    alert("height = "+ (vBounds_Ob - vBounds_Un)/mmFactor);
    Further you only have to do: create a function for rounding of the result.

  • Can I get field name of Selection screen ?

    Hi, experts.
    I'd like to manage PGM's screens & fields of screens. I need to know field names of selection screen in  external PGMs to manage input values of those fields.
    For values, I'll use 'Dynp_values_read', but what should I use for getting field names of selection screen?
    Is there any functions, classes or tables for PGM's fields of selection screen?
    I've found tables&functions for this and I found D020S, D020T, D021T for PGM's screen. But I counld't see proper field names that shows on a selection screen when I excuted PGM. I guess there's a conversion routine between data that saved in repository and field name on screen.
    Please let me know what should I use a function, tables or else.
    Thanks.

    Hi
    Use Read text pool syntax
    READ TEXTPOOL program name
    INTO T_TPOOL
    LANGUAGE 'NL'.
    within TB_TPOOL all select option field namees will be stored under field ID with type S
    Edited by: Lavanya K on Apr 22, 2009 10:02 AM

  • How can I make PLAY button be selected by default in top menu?

    Hi, I usually have the PLAY button and all the scene selection buttons show up in the same top menu on my DVD's. Is there a way to have the PLAY button be the one that is initially selected when the DVD starts up. In other words, I don't want people to have to scroll the various buttons on the menu to get to the PLAY button. I want it to be selected by default, so all they have to do is hit the PLAY button on their remote control to start the movie.
    Thanks, Bob

    I think Robert was referring to the triangular play button on the simulator control panel rather than the button on his menu marked 'Play'...
    Robert - the 'Enter' button (or your 'Return' key on your keyboard) are the only ways you'll get the simulator to begin to play your project. The Triangular play button is for when you are in a motion menu or track and you pause and re-start playback, and isn't used to select entries on the menu. When you start a track, note how the triangular play button becomes a pause button when the track starts running, and it is no longer greyed out... if you click it, you'll see the triangle return and also not be greyed out.

  • Getting the first option selected by default in a dropdown

    Hi all,
    I am using a dropdown within a form. I am populating the dropdown using the values I retrieved from the database by making use of for loop. Now, I have to make the first option selected as default. Also, I have to make use of the value in the drop down to retrieve further data without calling the form handler.
    To be more clear, While displaying the page for the first time the first option should be shown as selected and the associated contents of the first option should be displayed by default.
    Please help me in this.

    I'm going to basically repeat the answer to your other question that you seem to be ignoring completely:
    What part are you having trouble with? reading out the resultset, or building the html code. Do you have anything coded yet.

  • How  can i get the event of selected PageItem in ActionScript

    hi,
    when i select the pageitem on document then i want the event of that pageitem .
    Is there a possibility to get that event ?
    best thanks for any hint.
    govind

    Marcel,
    Please consult the "Tables" chapter in the UIX Developer's Guide. You can search for a method titled "doSelectionEvent" that will indicate how to deal with table selections.
    Hope this helps,
    Ryan Pollock

  • Can't get JInternalFrames to appear...

    Alrighty...I'm working on an application. Right now, it's nice and simple; I'm just trying to get accustomed to using JInternalFrames, as I'd planned to use several in the finished design. Unfortunately, they aren't appearing as I'd expected. Here's the code:
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class TacticsMaker
         static JFrame MainWindow;
         static JDesktopPane BackPanel = new JDesktopPane()
              public void paint(Graphics g)
                   g.drawString("This is the BackPanel.",10,10);
         public static void main(String[] args)
              MainWindow = new JFrame("Arena - The Game!");
              JInternalFrame PlotEditor = new JInternalFrame("Plot Editor", true, true, true, true);
              PlotEditor.setSize(300,300);
              PlotEditor.setLocation(0,0);
              PlotEditor.setVisible(true);
              BackPanel.setSize(500,500);
              MainWindow.setSize(500,500);
              BackPanel.add(PlotEditor);
              MainWindow.getContentPane().add(BackPanel);
              MainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              MainWindow.setVisible(true);
    }Checking the API, I see that I add the JInternalFrame to a JDesktopPane. I did that, I gave it size and location, and set visible to "true"...and get back nothing.
    I know the JDesktopPane is working right because the string appears on it, but no matter what I try to do with the JInternalFrame, it just won't show. What am I doing wrong?
    Thanks in advance.

    Duh. I can't believe I did that - and I looked it over about five million times, too. Thanks muchly.

  • Can not get JInternalFrame to setLocation

    Morning,
    I am stuck and could use some help, I've tried everything I could think of before posting, keep in mind I am a eng who is learning java on my own but I've tried everything I can think of already.
    I have a JInternalFrame to which I added a pane. I want this frame to overlap other panes, the problem is I can not seem to get the frame to obey the setLocation or setBounds command.
    the program is 6800+ lines but here is the relevant lines.
    operatingConditionsFrame = new JFrame;
    operatingConditionsFrams.getContentPane().setLayout(new BorderLayout());
    JDesktopPane operatingConditionsMainPane = new JDesktopPane();
    operatingConditionsMainPane.setLayout(
    new BoxLayout(operatingConditionsMainPane,BoxLayout.Y_AXIS));
    operatingConditionsMainPane.setBackground(new Color(41,128,166));
    operatingConditionsMainPane.setPreferredSize (
    new Dimension(operatingConditionsMainPaneWidth,
    operatingConditionsMainPaneLength));
    operatingConditionsMainPane.setMaximumSize (
    new Dimension(operatingConditionsMainPaneWidth,
    operatingConditionsMainPaneLength));
    operatingConditionsMainPane.setMinimumSize (
    new Dimension(operatingConditionsMainPaneWidth,
    operatingConditionsMainPaneLength));
    operatingConditionsFrame.add(operatingConditionsMainPane);
    JInternalFrame formulaSubScreen = new JInternalFrame();
    formulaSubScreen.getContentPane().setLayout(
    new BoxLayout(formulaSubScreen.getContentPane(),BoxLayout.X_AXIS));
    formulaSubScreen.setVisible( true );
    formulaSubScreen.setResizable( true );
    formulaSubScreen.setPreferredSize (new Dimension(200, 200));
    formulaSubScreen.setMaximumSize (new Dimension(200, 200));
    formulaSubScreen.setMinimumSize (new Dimension(200, 200));
    formulaSubScreen.getContentPane().add( formulaMainPane );
    formulaSubScreen.setBounds( 0,0,200,200);
    formulaSubScreen.pack();
    operatingConditionsMainPane.add( formulaSubScreen );
    The goal is to be able to control where the frame is placed.
    Any help would be greatly appreciated since I have been stuck for a while and need to move on.
    Thanks
    Pat
    Senior Field Applications Engineer
    Credence Corporation
    [email protected]
    www.credence.com

    ahhhhh, you are the man!!!!
    Thank you so much!!!!!
    It is a little more challenging because operatingConditionsMainPane has 4 panes and a internal frame. Each pane changes in length as well as operatingConditionsMainPane such that each time the user enters a new group then new rows corresponding to that group are added.
    I just need to keep up with the lenght of the panes but this will work.
    Thanks again,
    Pat
    PS. is there away to turn off the title bar on the internal frame ? I kust want a border around it like a pane has.

  • How can we get an image of selected area of the front panel

    i am plotting some graphs and want a group photo of all those in one shot is it possible????
    n i want to get the graph coordinates on the mouse click.....
    i.e when i click on the graph at any place the values corresponding to it must be retrieved. how do we do that,,...
    i have tried with the labview help but didnt get any help
    help please????????

    Here's a start.  This will get the front panel image and display it as a picture indicator.
    You could use an event structure to capture the mouse clicks on the picture control to set the image area.  Then using the mouse coordinates (referenced from the image coordinates), you can get the image subset "Get Image Subset.vi".
    Message Edited by vt92 on 04-20-2010 08:30 AM
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal

  • Can't get index of spry select menu with JQuery?

    If I do this with a regular (non-dynamic) select menu:
    $('.bogus').change(function(e){
              var i = e.currentTarget.selectedIndex;
              //alert(i);
              ds1.setCurrentRowNumber(i);
    It works. The detail region updates.
    But if I try it with a spry menu, nothing. No event is captured at all.
      <select class="bogus" spry:repeatchildren="ds1" size="10">
                  <option>{name}</option>
        </select>

    If I do this with a regular (non-dynamic) select menu:
    $('.bogus').change(function(e){
              var i = e.currentTarget.selectedIndex;
              //alert(i);
              ds1.setCurrentRowNumber(i);
    It works. The detail region updates.
    But if I try it with a spry menu, nothing. No event is captured at all.
      <select class="bogus" spry:repeatchildren="ds1" size="10">
                  <option>{name}</option>
        </select>

  • Can't get surround sound to work while default format is 96000Khz

    Hello,
    I finally figured out that for some reason I can play 5.1 surround sound if I choose the 24bit/48000Kh as the default format from the realtek manager, or for that matter from the Sound control panel.  But if i choose the 24bit/96000Kh from the realtek sound manager I only get stereo sound when played either from WMP or WMC.
    Does anyone know if this is a limitation of the sound card I have?
    According to the spec's I should have the for the s3480a are:
    Sound/Audio
    High Definition 6-channel audio
    ALC 888S chipset
    Also, and maybe for another post, i bought HDMI cable because I have a TV Tuner card in this unit but I can't seem to get it to work...
    HP ENVY 17-j005tx Notebook, HP ENVY Recline 27-k001a, HP ProLiant MicroServer Gen8 G2020T, HP MediaSmart EX495 Server, HP MediaVault 2020, HP ENVY 120 AiO Printer

    I've seen similar OEM "configurations" with RealTek codecs and the sound hardware on the motherboard. I "think" channel limitations at higher Khs are either a real hardware/codec limitations or the folks that design the PC are safeguarding against problems that show up when multi-channel is enabled at higher Khs (power draw, popping noises, whatever).
    This is total speculation on part.
    I have seen cases where updating the sound codec using the latest drivers available from realtek.tw allows you to select from more hz and channel options. But keep in mind more problems might pop up if you select a hz range beyond 48Mhz.
    ... an HP employee expressing his own opinion.
    Please post rather than send me a Message. It's good for the community and I might not be able to get back quickly. - Thank you.

  • I can't get my Text edit as a default changed

    I am trying to save an attachment to my desktop and unfortunately it always opens it in a textedit format. It seems that text edit is the default setting to open documents. Can anybody help I tried using the advice from previous posts but with no luck.

    It is a .pem file that I need to save on my desktop then copy and paste it into another website. I have been able to do it now on my Gateway through the Save As option but when I download the file on my Mac it gives me the option to save to Desktop or to Dropbox. When I click Desktop it saves in Downloads but also opens as a TextEdit file.
    Yes I have tried the Get Info, Open With option that I read about in earlier posts relating to this subject. Thank you for your assistance.

  • Can not get the browsers to open their default home page so are safari,firefox,chrome, can not get the browsers to open their default home page so are safari,firefox,chrome

    Safari won't recognize www.apple.com  if by chance opens the home page when I request another website , it tells me I am not connected to internet , but I am , then I try to go to firefox  and i get the same problem , then  I wnet to another place  (at&T htspot and all is working perfect all brwser work normal . I am assuming this has to do with my house network , but all other computers do not have a problem they work ok . So I ask is there a problem with my computer with the network , how can I see if that is the case

    The standard arch kernel includes all the required modules, at most you need to load them explicitly listing them in MODULES in /etc/rc.conf
    You need also the hw specific stuff, that is i915 and intelagp. Check lsmod and see if they are loaded. If they are not, inspect dmesg and see if udev tries to load them and fails for some reason.
    I remember some cases where intelagp and i915 are not loaded by udev in the right order, if this is your case you can try to list them in the right order in MODULES.
    There should be no need to recompile the kernel or to install a particular version of dri (just use the arch packages for mesa, libdrm etc; but I guess you have them already)

Maybe you are looking for

  • Mac mini can not find the NAS

    In my network I have a Mac mini, AirPort Extreme base station and a Netgear ReadyNAS Duo v2. Everything is connected by cable. The problem is that the Mac mini can not find the NAS. Mac mini is looking for wirelessly connected devices, type TimeCapsu

  • Win XP Pro x64 and DB 15 game p

    Hello All,here is what I posted on the :[color="#8008">[url="http://microsoft.public.windowsxp.help_and_support">micro soft. public.windowsxp.help_and_support[/url]?Besides many gamers who have custom joysticks and hardware which are not supported by

  • Missing layouts when creating new file

    Hi All, I'm using the current CC version of DreamWeaver. When I go File > New > Blank Page > HTML I only see two layouts in the Layout box: 2 column fixed, right sidebar, header and footer 3 column fixed, header and footer DreamWeaver help (http://he

  • Problem with context search in iFS

    Hello , here is my problem with iFS. We have installation of Oracle 8.1.7 Enterprise edition with interMedia and iFS 1.1 on same server (Windows NT Server 4.0/512 RAM). During install everything went fine. I had uploaded about 200 MB files in the iFS

  • How to use command pattern in grid computing

    IS there a more comprehensive command pattern example available ? In a real life command method, execute method will query coherence cache for objects. Does this cause any kind of deadlock issue, i.e., in cases where Command being a coherence cluster