JOptionPane Sizing

Seems simple - but how do I change the size of this - my drop-down menu doesn't fit!
Thanks
Sam

Look at setPreferredSize. You may also want to investigate setMinimumSize and setMaximumSize.

Similar Messages

  • Setting the default icons for JOptionPane

    i have my own LookAndFeel and i'm trying to set the icons of JOptionPane but it doesn't work, why?
    Icon errorIcon =  new ImageIcon( "images/EbooksIconMedium.png" );
    table.put( "OptionPane.errorIcon", errorIcon );
    table.put( "OptionPane.informationIcon", errorIcon );
    table.put( "OptionPane.questionIcon", errorIcon );
    table.put( "OptionPane.warningIcon", errorIcon );
    ....

    Hello Dmitry,
    There is no customizing for this - atleast to my knowledge.
    However, you should have to redo the settings again and again unless you are continuously re-sizing the main window.
    Cheers
    Aneesh

  • Data Federator Sizing & Usage

    Hi,
    I am looking for a Data Federator wiki & sizing guide..
    we have in the process of installing Data Federator 3.0 on a windows platform.
    I am not familiar with this component. Please throw some light on how is it exactly used..
    What does the Data Federator do ? why is it implmented...Please help me..

    Hi
    I would recommend to take a look at the user guide:
    http://help.sap.com/businessobject/product_guides/boexi3SP2/en/xi3_sp2_df_userguide_en.pdf
    Regards,
    Stratos

  • Unable to return values in joptionpane

    Hi all,
    Im having a slight problem with some code regarding a joptionpane. With the help of some code i found on the internet (lol i know theres a lot of bad stuff out there but i thought id give it a go), im making a new object array containing my fields, and then adding these objects to the joptionpane. it seems to work ok, but i cant get back the values the user entered into the fields - for a normal joptionpane id call the getText() method. (nb this is only a small test application, so it is ok that a password is being returned for anyone to see!)
    In my code below, all i can get it to do is return the objects details eg javax.swing.JTextField[,0,19,195x20,layout=javax.swing.plaf.basic.BasicTextUI$UpdateHandler,alignmentX=0.0 etc...., and not the value the user entered!
    Is this bad code for what im trying to do? what is the easiest way of returning the users password?
    Thanks in advance
    Torre
    here is the code:
    if ("changePwdPressed".equals(e.getActionCommand())){
                   Object complexMsg[] = { "Current Password: ", new JTextField(10), "New Password: ", new JTextField(10), "Confirm New Password: ", new JTextField(10) };
                   JOptionPane optionPane = new JOptionPane();
                   optionPane.setMessage(complexMsg);
                   optionPane.setMessageType(JOptionPane.INFORMATION_MESSAGE);
                  JDialog dialog = optionPane.createDialog(this, "Change Password");
                  dialog.setVisible(true);
                  int i;
                  for (i=0; i<complexMsg.length; i++)
                  System.out.println(complexMsg);

    This works, but it's ugly...
    package forums;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class ComplexJDialogTest
      public static void main(String[] args) {
        try {
          System.out.println("Hello World!");
          message();
          System.out.println("Hello World!");
        } catch (Exception e) {
          e.printStackTrace();
      private static void message() {
        Object messages[] = {
            "Current Password: ", new JTextField(10)
          , "New Password: ", new JTextField(10)
          , "Confirm New Password: ", new JTextField(10)
        JOptionPane optionPane = new JOptionPane(messages, JOptionPane.INFORMATION_MESSAGE);
        JDialog dialog = optionPane.createDialog(null, "Change Password");
        dialog.setVisible(true);
        for (int i=1; i<messages.length; i+=2) {
          System.out.println(((JTextField)messages).getText());
    dialog.dispose();
    ... I think I would prefer swmtgoet_x's solution... just create your three JTextField's (keep references to them) pass them to the JDialog, then (after user hits OK done) just access them directly.... ergo...
    package forums;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    class ComplexJDialogTest
      public static void main(String[] args) {
        try {
          System.out.println("Hello World!");
          message();
          System.out.println("Hello World!");
        } catch (Exception e) {
          e.printStackTrace();
      private static void message() {
        JTextField oldPassword = new JTextField(10);
        JTextField newPassword = new JTextField(10);
        JTextField newPasswordAgain = new JTextField(10);
        Object messages[] = {
            "Current Password: ", oldPassword
          , "New Password: ", newPassword
          , "Confirm New Password: ", newPasswordAgain
        JOptionPane optionPane = new JOptionPane(messages, JOptionPane.INFORMATION_MESSAGE);
        JDialog dialog = optionPane.createDialog(null, "Change Password");
        dialog.setVisible(true);
        dialog.dispose();
        System.out.println(oldPassword.getText());
        System.out.println(newPassword.getText());
        System.out.println(newPasswordAgain.getText());

  • Key-enable buttons on a JOptionPane

    Hi,
    The existing code in my Application uses a JOptionPane static method = JOptionPane.showOptionDialog() to create a dialog box.Is there any way I can key-enable the buttons on the dialog created by this method.
    public int createAndShowGUI() {
    if (!issuesPanel.hasIssues())
    return -2; //TODO make constant
    else {
    //Custom button text
    String[] options = should_continue ? new String[] {returnText, continueText} : new String[] {returnText};
    int optionButtons = should_continue ? JOptionPane.OK_CANCEL_OPTION : JOptionPane.CANCEL_OPTION ;
    log.info("IssuesOptionPane displayed - " + title);
    int optionChosen = JOptionPane.showOptionDialog(parent,
    issuesPanel.createAndGetIssuesPanel(),
    title,
    optionButtons,
    JOptionPane.PLAIN_MESSAGE,
    null, //don't use a custom icon
    options, //titles of buttons
    null); //no default selected button
    String buttontext = optionChosen == CLOSE ? "X" : options[optionChosen];
    log.info("User clicked on the " + buttontext + " button");
    return optionChosen;
    I see that there is no way to get a handle on the JButtons created by the JOptionPane.So, one work around that I tried is to create a JPanel, add JButtons , set Input Map, set Action Map ( to add key bindings ) on it.Then create a JDialog and pass this JPanel to the dialog using setContentPane
         private static void createAndShowGUI(){
              JButton bookingButton=new JButton(bookStr);
              JButton returnButton=new JButton(returnStr);
              bookingButton.addActionListener(new BookAction());
              returnButton.addActionListener(new ReturnAction());
              JPanel panel=new JPanel();
              panel.add(bookingButton);
              panel.add(returnButton);
              panel.setActionMap(initActionMap());
              initAndSetInputMap(panel);
              JDialog dialog=new JDialog();
              dialog.setSize(400,100);
              dialog.setModal(true);
              dialog.setContentPane(panel);
              dialog.addPropertyChangeListener(indicator,listener);
              System.out.println("step 1" );
              dialog.pack();
              System.out.println("step 2");
              dialog.setVisible(true);
    But the problem that I am facing here is that the property change events triggered by the code inside the actionPerformed methods is not getting capturesd by the listener attached to the JDialog.
    Any thoughts?
    Thanks
    Aman

    google: JOptionPane mnemonics
    http://www.devx.com/tips/Tip/13718
    http://forum.java.sun.com/thread.jspa?threadID=321824&messageID=1649963
    http://coding.derkeiler.com/Archive/Java/comp.lang.java.gui/2005-03/0495.html
    etc.

  • "Memory  Sizing" error on Sun Fire V65x

    Hello.
    I have some trouble with my old Sun Fire V65x and i hope that you guys can help me out.
    I had 2,5GB RAM installed in my server, working flawless. 2 x 256MB and 2 x 1GB modules. 256-modules in Bank 1 and 1GB´s in Bank 2.
    To get rid of the boot up warning of wrong memory configuration i moved the 2 1GB modules to bank 3 (as stated in the manual) but that was when the problem started.
    In this configuration the server won't go to POST, i tried moving the 1GB modules around between bank 1, 2 & 3 without any result.
    The server will not go to POST. No beeps, no nothing. When turning the server on line it starts up, the fans starts running on at maximum speed and that's all, no picture and no POST and the system warning LED turns to red. After a couple of minutes in this state the fans slow down for a couple of seconds and then back to 100% (repeating cycle)
    The POST diagnostics LEDs at the back of the main board indicates POST code 13h, "Memory sizing". The main board does not report any defective DIMMs, also worth mentioning is that the 2 256MB DIMMs are working flawlessly in all banks.
    I have tried:
    Resetting the memory config in BIOS (using the 2x256 DIMMs and then installing the 2 1GB modules.
    Moving the memory modules around between different banks, both alone and with the 2 256MB DIMMs present.
    Clearing the CMOS settings.
    Searching manuals and Google for hours without answer to my problem or what "memory sizing " means in this situation.
    System:
    Sun Fire V65x
    1 CPU
    If anyone know the answer to my dilemma and are willing to help me, i would be really grateful.
    Sadly i do not have the possibility to test the memory modules in another system.
    Best regards. Erik Järlestrand, Sweden.

    Hardware. A reboot will probably not do anything. From what I can tell, it's a CPU cache problem. If you do anything, shut the system down completely, turn the power off for a minimum of 20 seconds to let any residual electricty go away, the turn it back on. If the problem returns, you'll most likely need to either get a new CPU module or a new V100. I don't know if the CPU can be removed from the V100 motherboard, but since there are jumper settings for the speed I would assume that you can.

  • I publish a 41mb newsletter monthly into interactive pdf. It always becomes a file size of 4mb, 10% of original, when I save to pdf. This month my newsletter is 41mb and it drops to 11mb, 25% of original. I have re-sized all pictures, deleted pages separa

    I publish a 41mb InDesign newsletter monthly into interactive pdf. It always becomes a file size of 4mb, 10% of original, when I save to pdf. This month my newsletter is 41mb and it drops to 11mb, 25% of original. I have re-sized all pictures, deleted pages separately, have gotten the file size down to 16mb and it drops to 7mb, 45% of original.
    I have gone back and saved Feb and March and it saves to 10% of original, as it did before, and I use the same mechanism to save now.
    I have gone to Acrobat Pro and optimized down to 8.8mb, but the quality is not acceptable.
    What other variable is there that I haven't discovered?

    My daughter has had her Razr for about 9 months now.  About two weeks ago she picked up her phone in the morning on her way to school when she noticed two cracks, both starting at the camera lens. One goes completely to the bottom and the other goes sharply to the side. She has never dropped it and me and my husband went over it with a fine tooth comb. We looked under a magnifying glass and could no find any reason for the glass to crack. Not one ding, scratch or bang. Our daughter really takes good care of her stuff, but we still wanted to make sure before we sent it in for repairs. Well we did and we got a reply from Motorola with a picture of the cracks saying this was customer abuse and that it is not covered under warranty. Even though they did not find any physical damage to back it up. Well I e-mailed them back and told them I did a little research and found pages of people having the same problems. Well I did not hear from them until I received a notice from Fed Ex that they were sending the phone back. NOT FIXED!!! I went to look up why and guess what there is no case open any more for the phone. It has been wiped clean. I put in the RMA # it comes back not found, I put in the ID #, the SN# and all comes back not found. Yet a day earlier all the info was there. I know there is a lot more people like me and all of you, but they just don't want to be bothered so they pay to have it fix, just to have it do it again. Unless they have found the problem and only fixing it on a customer pay only set up. I am furious and will not be recommending this phone to anyone. And to think I was considering this phone for my next up grade! NOT!!!!

  • Problem with JPanel sizing!

    Hi,
    Just having a bit of difficulty with the sizing of JPanels. For example, if I create a JPanel and add it to a Frame, no matter what I set the size to the JPanel fills the entire Frame. I don't really know whats going on here and I'm just making guesses! If anyone has a good resource on the whole sizing thing or can point out what I'm doing wrong, that would be great. Thanks!
    // Constructor
    public void ClassName()
            mainWindow = new JFrame();
            mainWindow.setSize(mainWindowWidth, mainWindowHeight);
            mainWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JPanel aPanel = new JPanel();
            aPanel.setSize(mainWindowWidth/2,mainWindowHeight/2); );
            aPanel.setBackground(Color.GREEN);
            mainWindow.add(aPanel);
            mainWindow.validate();
    }Edited by: LeWalrus on May 18, 2009 5:03 AM

    By default, JFrame uses a BorderLayout which gives the center component (your panel in this case) all available height and width.
    For absolute positioning you need to use a null layout.
    If you want a layout manager that can let your panel fill half the height/width, I think it might be possible with GridBagLayout or more recommended MiGLayout (but that adds a third party jar dependency).
    See the [layout tutorial|http://java.sun.com/docs/books/tutorial/uiswing/layout/index.html].

  • Problem with Photos and Camera and Sizing Set

    I have a 3gs and upgraded to 4.0. Things seemed fine but yesterday when I opened up the Camera Roll in Photos there was 1 picture showing and a large black rectangular box. No other photos were showing. I tapped on the black box and it showed all the photos using the slider to go from 1 to the next. I couldn't figure out how to get rid of the black box so that all the photos showed up normally, so I deleted each of the photos. The size of the box shrank as each photo was deleted. Then when I went into Photos, it opened with an empty screen and immediately closed. I then tried to use the Camera and it started up and immediately closed. So I sent myself an email with a photo and saved it to Photos. Its there and so is the black box! Now the camera will work! To further complicate, I decided I'd use the photo for wallpaper. Problem is I can't size it!! I can move it and size it with my fingers, but then when I release, it immediately pops back to full size and I can't "Set" the image size. Does anyone have any idea what's going on!!

    Well I solved it. I uploaded my photos to My Gallery. Then I took a photo with the camera and saved it. I then deleted all the other photos except the one I just took. Then I exited Photos and then came back in and it was working fine, so I then downloaded the photos that I had just uploaded to My Gallery. Still have a problem though with sizing the photos for the Lock and Home screens. I can't get the Set button to hold a size. Any ideas on that?

  • NEW NICHE DEVICE NEEDED: a MINI sized moitor for  portbility!!

    The first time I saw the Mini, in my mind I envisioned an entire desktop ensemble comprised of Mini sized gadgets- smaller sized keyboards, little mice, cute little USB HD's and yes an itty bitty sized flat screen monitor like those digi picture frames that everyone is making! This is the biggest no brainer solution which so far has escaped the entire industry!
    The Mini,after all is no smaller and no more portable than the size of the largest periphrial device in the desktop system.The smallest monitor sold in any retail store is currently 17" diag. and what we need is half that size. Funny how everyone jumped on the Mac Mini fashion statement to make external drives and every other kind of USB periphrial device within the chassias size of the Mini which was smart niche marketing...except they neglected to exploit the ultimate ADVANTAGE the Mini could afford as being the smallest most power and capable desktop system. Perhaps Apple neglected to embellish this advantage in order to prevent the affordable Mini from hurting its laptop sales.Just a theory. But third party vendors have also ignored this obvious design advantage and have not given us any Mini sized keyboards and monitors.
    Now we see so called Mac Mini-designed keyboards that are smaller than those huge surfboard sized ergonomic shaped padded boards that serve well as a desktop bed pillow and arm rest but these new keyboards are really just the old skool no-frills boards that are smaller than the new styled surfboard sized ones.
    While I can carry my Mini +my 500Gb USB external drive +mouse +power adaptor inside a cute leather shaving kit bag, the modularity factor becomes a JOKE when I walk into a Starbucks or Public Library with a 22" Flat screen monitor under one arm and my little shaving bag in my hand!!I got yelled at by two fat ladies at the Library when after asking them if I can plug my Mini into their ac wall socket I went to my car and returned with my fullsized roller suitcase containing my shaving bag with Mini Plus my billboard sized flat screen monitor.
    "We don't allow HUGE MAYFLOWER MOVING TRILER SIZED suitcases inside the Public Library ,sir!! YOU MUST LEAVE AT ONCE OR GET RID OF THAT SUITCASE!"
    "But,madame sir, this is my Mac "MINI"..its mini mini mini mini OTHERWISE I WOULD HAVE TWO ROLLER SUITCASES-One for my Mac Tower of Power and one for my billowing billboard sized monitor!!!!", I pleaded. Then I rolled my empty roller suitcase outside (its back-up beeper beeping as I carefully navigated through the metel detector gates.UuuuGhhhh
    Watch...someone flunky engineer in some company somewhere will read this post and get a light bulb over his otherwise empty skull and get himself one huge promotion by sketching a new Mac Mini 10 " flatscreen monitor that sells cheap for $100! I'm here waiting with cash in hand...

    Google is your friend.
    I got a bunch of hits on +portable monitors+, however I have used these folks for personal projects before: lilliput
    Folks started using these things in car installations of home computers, and a niche market for folks that want portable monitors was born.
    Luck-
    -DP

  • NEW NICHE DEVICE NEEDED: a MINI sized monitor for  portbility!!

    The first time I saw the Mini, in my mind I envisioned an entire desktop ensemble comprised of Mini sized gadgets- smaller sized keyboards, little mice, cute little USB HD's and yes an itty bitty sized flat screen monitor like those digi picture frames that everyone is making! This is the biggest no brainer solution which so far has escaped the entire industry!
    The Mini,after all is no smaller and no more portable than the size of the largest periphrial device in the desktop system.The smallest monitor sold in any retail store is currently 17" diag. and what we need is half that size. Funny how everyone jumped on the Mac Mini fashion statement to make external drives and every other kind of USB periphrial device within the chassias size of the Mini which was smart niche marketing...except they neglected to exploit the ultimate ADVANTAGE the Mini could afford as being the smallest most power and capable desktop system. Perhaps Apple neglected to embellish this advantage in order to prevent the affordable Mini from hurting its laptop sales.Just a theory. But third party vendors have also ignored this obvious design advantage and have not given us any Mini sized keyboards and monitors.
    Now we see so called Mac Mini-designed keyboards that are smaller than those huge surfboard sized ergonomic shaped padded boards that serve well as a desktop bed pillow and arm rest but these new keyboards are really just the old skool no-frills boards that are smaller than the new styled surfboard sized ones.
    While I can carry my Mini +my 500Gb USB external drive +mouse +power adaptor inside a cute leather shaving kit bag, the modularity factor becomes a JOKE when I walk into a Starbucks or Public Library with a 22" Flat screen monitor under one arm and my little shaving bag in my hand!!I got yelled at by two fat ladies at the Library when after asking them if I can plug my Mini into their ac wall socket I went to my car and returned with my fullsized roller suitcase containing my shaving bag with Mini Plus my billboard sized flat screen monitor.
    "We don't allow HUGE MAYFLOWER MOVING TRILER SIZED suitcases inside the Public Library ,sir!! YOU MUST LEAVE AT ONCE OR GET RID OF THAT SUITCASE!"
    "But,madame sir, this is my Mac "MINI"..its mini mini mini mini OTHERWISE I WOULD HAVE TWO ROLLER SUITCASES-One for my Mac Tower of Power and one for my billowing billboard sized monitor!!!!", I pleaded. Then I rolled my empty roller suitcase outside (its back-up beeper beeping as I carefully navigated through the metel detector gates.UuuuGhhhh
    Watch...someone flunky engineer in some company somewhere will read this post and get a light bulb over his otherwise empty skull and get himself one huge promotion by sketching a new Mac Mini 10 " flatscreen monitor that sells cheap for $100! I'm here waiting with cash in hand...

    Your assumption is that folks who need portability prefer to use a fragile battery powered toy with a PDA style rinky **** keypad with tiny trackball gizmo and that assumption is dead wrong. Proof lies in the keyboard/mice/periphrial device aisle of any computer store. You see tons of USB devices for laptops intended solely to provide desktop system features/capability that the laptop doesn't provide. An lets not forget to add the cost of repairing these fragile thin puters..replacing adaptor cords and battery packs etc . Soon you've got more $ tied up ina laptop than you ever intended.
    Personally I've yet to meet ANY laptop user who LOVES the tricky pain in the a**
    trackball navigation mechanism and compact PDA-like keypad. Everyone I know relies upon a USB mouse and most folks are plugging fullsize keybords into their slim fragile overpriced laptops because pecking on the rinky **** keypad toy greatly increases the risk of damaging or dropping the computer. ( They are merely trying to minimize the need to touch the machine as they work which is smart thinking ..its the desktop systems design strategy as well.
    The machine itself need not be touched and so we use wireless or USB periphrial devices . The Mini therefore is classified as a desktop but by definition "desktop system "does not preclude the need nor capability for modular portability and besides the MAC MINI IS BY FAR MORE DURABLE AND IMPACT RESISTANT THAN ANY LAPTOP so there goes your premis out the window.
    I'll bet you one dozen ac powered laptop chiller pads, two sticks of DDR RAM and five laptop replacement power adaptors/battery chargers ('cause you laptop users seem to go through these pricey adaptors/cords faster than alkaline
    batteries in a boombox at a beach bikini contest!) that if you displayed a Mac Mini with a small 10"screen sitting beside it and full size keyboard/mouse priced for $850 in the Apple store laptop sales would puke.
    There's no debate that when you need thin notebook sized
    modularity and battery pwr the laptop is the only solution.
    I've not been hampered by the lack of battery powerpack just the lack of
    a small monitor.

  • I am trying to print a passport sized headshot and I get a full page photo. How to I print out a smaller size?

    I am trying to print a passport sized headshot and I get a full page photo isntead. I downloaded the shot from i photo and chose "small" but it didn't help.
    I also cropped the photo on iphoto to the dorrect size but no difference. I have a Canon MX 870 printer. Please advise.

    In iPhoto select the photo and print - select the paper size and a custom print size (2x2 i believe for passports) and print
    LN

  • Focus on JOptionPane

    I have a problem.
    If I want to change something within a table, a JOptionPane opens, in which i can enter some values.
    But if I switch to another program over the task bar while the JOptionPane is still open, and I return to my Java program over the task bar, the main window has the focus and the JOptionPane is hidden. During this, the user has no posibillity to close the program. The only possibility to get the JOptionPane back is by ALT+TAB!
    Is it possible, that the JOptionPane will over the task bar?

    Just to easy, that it is really embarassing:
    JOptionPane.showMessageDialog(frame,"Message");
    The first parameter is the parent container. If you pass your main frame, it is modal and in front of the frame!

  • JOptionPane.showInputDialog and Focus

    I have a program that allows the user to type in a String in a text box and when they hit the enter key the text will appear in a text area. I've also added a menu bar to the program. When the user clicks on File and then Connect from the menu bar I want a JOptionPane to pop up that asks for the user to type in a username and then prompt for a password. And I've gotten all of that to work. Now for the problem. I click on file from the menu bar and then connect and it prompts me for the username as it should. I am able to just type in a phrase in the text field of the username dialog box and hit the enter key and then it prompts me for my password. I am still able to type in a phrase in the text field of the password Dialog box, however when I hit the enter key, the Dialog box does not close as it did for the username Dialog box. It will still close if I click on the OK button, but just pressing the enter key does not close the Dialog box as it did when it prompted for a username. I'm thinking I need to direct the focus to the password dialog box, but not sure how to go about doing this. Any help in solving this problem would be greatly appreciated.
    Here is my code:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class TestJOptionPane extends JFrame implements ActionListener{
         private static int borderwidth = 570;
         private static int borderheight = 500;
         private JPanel p1 = new JPanel();
         private JMenu m1 = new JMenu("File");
         private JMenuBar mb1 = new JMenuBar();
         private JTextArea ta1 = new JTextArea("");
         private JTextField tf1 =new JTextField();
         private Container pane;
         private static String s1, username, password;
         private JMenuItem [] mia1 = {new JMenuItem("Connect"),new JMenuItem("DisConnect"),
              new JMenuItem("New..."), new JMenuItem ("Open..."), new JMenuItem ("Save"),
              new JMenuItem ("Save As..."), new JMenuItem ("Exit")};
    public TestJOptionPane (){
         pane = this.getContentPane();
              addWindowListener(new WindowAdapter() {
                   public void windowClosing(WindowEvent e) {
         dispose();
    System.exit(0);
         setJMenuBar(mb1);
    mb1.add(m1);
    for(int j=0; j<mia1.length; j++){
         m1.add(mia1[j]);
    p1.setLayout( new BorderLayout(0,0));
    setSize(borderwidth, borderheight);
    pane.add(p1);
              p1.add(tf1, BorderLayout.NORTH);
              p1.add(ta1, BorderLayout.CENTER);
              this.show();
              tf1.addActionListener(this);
              for(int j=0; j<mia1.length; j++){
                   mia1[j].addActionListener(this);
         public void actionPerformed(ActionEvent e){
              Object source = e.getSource();
              if(source.equals(mia1 [0])){
                   username = JOptionPane.showInputDialog(pane, "Username");
                   password = JOptionPane.showInputDialog(pane, "Password");
              if(source.equals(tf1)){
                   s1=tf1.getText();
                   ta1.append(s1+"\n");
                   s1="";
                   tf1.setText("");
         public static void main(String args[]){
              TestJOptionPane test= new TestJOptionPane();
    }

    But using JOptionPane doesn't get the focus when you call itworks ok like this
    import javax.swing.*;
    import java.awt.event.*;
    class Testing
      public Testing()
        final JPasswordField pwd = new JPasswordField(10);
        ActionListener al = new ActionListener(){
          public void actionPerformed(ActionEvent ae){
            pwd.requestFocusInWindow();}};
        javax.swing.Timer timer = new javax.swing.Timer(250,al);
        timer.setRepeats(false);
        timer.start();
        int action = JOptionPane.showConfirmDialog(null, pwd,"Enter Password",JOptionPane.OK_CANCEL_OPTION);
        if(action < 0)JOptionPane.showMessageDialog(null,"Cancel, X or escape key selected");
        else JOptionPane.showMessageDialog(null,"Your password is "+new String(pwd.getPassword()));
        System.exit(0);
      public static void main(String args[]){new Testing();}
    }

  • XML Publisher - OPP log: Output file was found but is zero sized - Deleted

    Hi,
    I have created one Main template and sub-template is called from it. I am working with Oracle Apps version 12.1.1. XML Source file gets created using rdf file attached to the concurrent program. Now after registering main template with the required concurrent program when i tried to execute it "View Output" button shows XML souce data instead of PDF report which i have called using main template. Log file was showing following error,
    Executing request completion options...
    Output file size:
    33140
    ------------- 1) PUBLISH -------------
    Beginning post-processing of request 3739501 on node ORAAPP13 at 09-AUG-2011 22:16:38.
    Post-processing of request 3739501 failed at 09-AUG-2011 22:16:51 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    ------------- 2) PRINT   -------------
    Not printing the output of this request because post-processing failed.
    Finished executing request completion options.
    And the OPP service log has following error, Can anyone guide me to solve this error.
    Template code: AERO_INV_MAIN
    Template app: XXAV
    Language: en
    Territory: US
    Output type: PDF
    [8/9/11 10:16:51 PM] [339827:RT3739501] Output file was found but is zero sized - Deleted
    [8/9/11 10:16:51 PM] [UNEXPECTED] [339827:RT3739501] java.lang.reflect.InvocationTargetException
         at sun.reflect.GeneratedMethodAccessor66.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(XSLT10gR1.java:611)
         at oracle.apps.xdo.common.xml.XSLT10gR1.transform(XSLT10gR1.java:239)
         at oracle.apps.xdo.common.xml.XSLTWrapper.transform(XSLTWrapper.java:182)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:1044)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:997)
         at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(FOUtility.java:212)
         at oracle.apps.xdo.template.FOProcessor.createFO(FOProcessor.java:1665)
         at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:975)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5936)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3459)
         at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3548)
         at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:302)
         at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:176)
    Caused by: java.lang.StackOverflowError
         at java.text.DecimalFormat.subformat(DecimalFormat.java:877)
         at java.text.DecimalFormat.format(DecimalFormat.java:674)
         at java.text.DecimalFormat.format(DecimalFormat.java:608)
         at java.text.SimpleDateFormat.zeroPaddingNumber(SimpleDateFormat.java:1203)
         at java.text.SimpleDateFormat.subFormat(SimpleDateFormat.java:1142)
         at java.text.SimpleDateFormat.format(SimpleDateFormat.java:899)
         at java.text.SimpleDateFormat.format(SimpleDateFormat.java:869)
         at java.text.DateFormat.format(DateFormat.java:316)
         at oracle.apps.fnd.security.CallStack.getInstance(CallStack.java:97)
         at oracle.apps.fnd.security.DBConnObj.setBorrowingThread(DBConnObj.java:990)
         at oracle.apps.fnd.security.DBConnObj.setBorrowingThread(DBConnObj.java:973)
         at oracle.apps.fnd.common.Pool.costBasedSelection(Pool.java:1885)
         at oracle.apps.fnd.common.Pool.selectObject(Pool.java:1686)
         at oracle.apps.fnd.common.Pool.borrowObject(Pool.java:950)
         at oracle.apps.fnd.security.DBConnObjPool.borrowObject(DBConnObjPool.java:584)
         at oracle.apps.fnd.security.AppsConnectionManager.borrowConnection(AppsConnectionManager.java:330)
         at oracle.apps.fnd.common.Context.borrowConnection(Context.java:1719)
         at oracle.apps.fnd.common.AppsContext.getPrivateConnectionFinal(AppsContext.java:2314)
         at oracle.apps.fnd.common.AppsContext.getPrivateConnection(AppsContext.java:2251)
         at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:2108)
         at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1918)
         at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1762)
         at oracle.apps.fnd.common.AppsContext.getJDBCConnection(AppsContext.java:1775)
         at oracle.apps.fnd.common.Context.getJDBCConnection(Context.java:1453)
         at oracle.apps.fnd.cache.GenericCacheLoader.load(GenericCacheLoader.java:170)
         at oracle.apps.fnd.profiles.Profiles.getProfileOption(Profiles.java:1500)
         at oracle.apps.fnd.profiles.Profiles.getProfile(Profiles.java:362)
         at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfileFromDB(ExtendedProfileStore.java:211)
         at oracle.apps.fnd.profiles.ExtendedProfileStore.getSpecificProfile(ExtendedProfileStore.java:171)
         at oracle.apps.fnd.profiles.ExtendedProfileStore.getProfile(ExtendedProfileStore.java:148)
         at oracle.apps.fnd.common.logging.DebugEventManager.configureUsingDatabaseValues(DebugEventManager.java:1294)
         at oracle.apps.fnd.common.logging.DebugEventManager.configureLogging(DebugEventManager.java:1149)
         at oracle.apps.fnd.common.logging.DebugEventManager.internalReinit(DebugEventManager.java:1118)
         at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:1085)
         at oracle.apps.fnd.common.logging.DebugEventManager.reInitialize(DebugEventManager.java:1072)
         at oracle.apps.fnd.common.AppsLog.reInitialize(AppsLog.java:595)
         at oracle.apps.fnd.common.AppsContext.initLog(AppsContext.java:602)
         at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:579)
         at oracle.apps.fnd.common.AppsContext.initializeContext(AppsContext.java:533)
         at oracle.apps.fnd.common.AppsContext.<init>(AppsContext.java:301)
         at oracle.apps.xdo.oa.schema.server.OAURLConnection.getAppsContext(OAURLConnection.java:121)
         at oracle.apps.xdo.oa.schema.server.TemplateURLConnection.getInputStream(TemplateURLConnection.java:89)
         at java.net.URL.openStream(URL.java:1009)
         at oracle.xdo.parser.v2.XMLReader.openURL(XMLReader.java:2353)
         at oracle.xdo.parser.v2.XMLReader.pushXMLReader(XMLReader.java:270)
         at oracle.xdo.parser.v2.XMLParser.parse(XMLParser.java:256)
         at oracle.xdo.parser.v2.XSLBuilder.processIncludeHref(XSLBuilder.java:1045)
         at oracle.xdo.parser.v2.XSLBuilder.processImportHref(XSLBuilder.java:984)
         at oracle.xdo.parser.v2.XSLBuilder.processImport(XSLBuilder.java:949)
         at oracle.xdo.parser.v2.XSLBuilder.startElement(XSLBuilder.java:373)
         at oracle.xdo.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1252)
         at oracle.xdo.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:338)
         at oracle.xdo.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:285)
    Regards,
    Priyanka

    And metalink note 1100253.1 states that this issue (java.lang.StackOverflowError) might be caused by a too large set of data to be sorted in the layout file. Recommendation is to removed the sort from the layout file and instead sort the data already in the data definition.
    regards,
    David.

Maybe you are looking for

  • Displaying tab page canvas on content canvas in Forms 6i

    Forms [32 Bit] Version 6.0.8.8.0 (Production) I have an existing form which has multiple canvases and there are couple of fields on Content canvas and then on the same content a Tab canvas is layed out. I can see both canvases in same layout editor a

  • How to created sales order through xi in CRM...?

    Hi My scenario is like this I have one purchase order web application. when i click submit request will go to xi throgh http request. After it receiving the request xi will take the purchase order and based on the purchase order it will create a sale

  • My ipod is crazy. it needs to be locked up.

    it keeps going from one song to the next, really fast, not playing any music at all just skipping ahead to tHe next song then the next and so on. AHHHHHHHHHRRRGGGGGHHHHHHHHHH!!!!!

  • ME21N shopping basket

    Hi Experts I have a requirement where i need to populate the me21n shopping basket with a Purchase requisition, since i have to create a PO with reference to the PR. The me21n transaction is invoked using call transaction from a workflow method. I wa

  • Firefox not displaying IWeb site correctly

    Since the last two Firefox upgrades (I'm on the most current one now) on a Mac, my Iweb site is not displaying correctly. There are circle graphics on the left side of the page (they fill the left side) and only a few show. When I click refresh diffe