Setting Dialog's size with CDC-pp

Hi
I'm trying to adapt an AWT version of JOptionPane so it can run correctly on IPaq(running Linux Familiar 0.7.2 if you want to know everything), using j2me cdc personal profile.
On PC, the class does what it's supposed to do(show a message/confirm/dialog box with the correct size). But when I run the class on my IPaq, the dialog box is so small, I can't see it. When I use the setSize() method, I can see something, but it's not the best solution, since it's not adapted to the content of the dialog box.
Has somebody managed to resize a component to its preferred size on IPaq(the pack() and getPreferredSize() don't seem to work, but maybe I haven't use them correctly)?
thanks

actually, the call to setResizable(false/true) before the setting of the dimensions causes this behaviour.
Originally, I put setResizable(false); and few lines later, I put pack(); or setSize();
Actually you must do the other way round: first put pack(); or setSize(); then setResizable(false);

Similar Messages

  • How to set the screen size with nested Iview screen

    Can someone show me how to set the screen size with nested IView  screen.
    at the moment i only try it with trial and error untill it looks somewhat close. Is there a property in VC to set the size for Height and width.
    The same question is for the form. the form elements inside the form is easy but the actual form is still a challenge.

    Hi,
    Yes you are correct ,Still the Form and iview are not able to change thier Layout Structure using a Propery.
    it is available with VC7.1
    Govindu

  • How to set dialog to tofront with out using modal?

    i'm using toFront() method in my application in focusgained & window activated but it is not working on solaris.what to do?

    Prepaid cards are not available in New Zealand since the iTMS isn't available there. The only way you could purchase from the iTunes Music Store would be of someone in a country that has one were to purchase a card in that country, send it to you, and allow you to set up an account using their mailing address.

  • Forms: How to set a maximum size in Text Fields with automatic size

    ¡Hi!
    When I set a text field on my forms and I use automatic size for te text that the user can write, if the user don't need more space than the field size, when the text appears, Adobe Acrobat Pro always set the text-size to 14 or higher. How can I set a maximum size for that text? For example... 12 or 10...
    Thank you very much,
    Best regards from Spain,
    David.

    Ok. If I use a single line text field, changing the height of the field seems to be a simple way to solve the problem, but... what should I do when the fields are multi-lineal?
    Thanx for your quick answer.

  • Open and Save dialog box size?

    How can I set a larger dialog box size for opening and saving files within any application? It seems as if they always appear with an 800 x 600 size witch is very small when you you have a large, high resolution screen. Thanks and Happy Holidays!

    Welcome to Apple Discussions.
    For a larger Open & Save just drag the lower right hand corner of the window.
    To expand the view click on the large blue triangle.
    -mj

  • Photosmart C410: How do I associate a custom paper size with the photo tray?

    Our Photosmart 3310 recently broke down and I purchased a C410 to replace it.  I sell a small item online that I ship in 3 5/8 x 6 1/2 envelopes.  With the 3310, I had figured out a way to print the envelopes from the photo tray.  While Word 2007 allows me to select the photo tray, the printer would not print from there until I created a custom paper size in the printer preferences dialog box.
    One of the reasons I got the C410 was for the photo tray.  It's a real pain to have to swap out the regular paper and stick in one evelope every time I want to print another envelope.  Well, unfortunately, that's what I've been doing.  I select the photo tray in Word, but the printer goes right ahead and prints from the main tray.  I had forgotten what I did to make it work on the 3310, so I experimented with that printer's drivers until I figured it out.
    My problem is that the software interface for the C410 is different than that for the 3310.  I can't figure out how to associate a custom paper size with the photo tray.  To test my theory this evening, I told Word that my envelope size was 5 x 7.  The printer didn't hesitate to take an envelope from the photo tray.  Of course the return address went into a dark void because the envelope is not 5 x 7.
    The difference between the two interfaces is that the 3310 has both printing shortcuts as well as "Print Task Quick Sets."  The C410 only has printing shortcuts.
    If anyone can help me, I'll be very grateful!  I've probably spent hours trying to get this figured out, and I have no idea what to do.

    Hi,
    Which Microsoft product (application) are you using ? Printer supports the following custom sizes:
    From ADF: Custom-sized media (ADF) between 127 to 216 mm wide and 241 to 305 mm long (5 to 8.5 inches wide and 9.5 to 12 inches long)
    From input tray: Custom-sized media between 76.2 to 216 mm wide and 101 to 762 mm long (3 to 8.5 inches wide and 4 to 30 inches long)
    You need to select right custom size from the application.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How do I set the frame size

    I am Making a program for purchasing games, with the basic layout alsot done, except on problem. When the purchase button is pressed, a dialog shows up but nothing is seen until i resize it. How would i set the frame size so that i do not need to resize it each time? below is the code for the files. Many thanks in advance.
    CreditDialog
    import java.awt.*;
    import java.awt.event.*;
    class CreditDialog extends Dialog implements ActionListener { // Begin Class
         private Label creditLabel = new Label("Message space here",Label.RIGHT);
         private String creditMessage;
         private TextField remove = new TextField(20);
         private Button okButton = new Button("OK");
         public CreditDialog(Frame frameIn, String message) { // Begin Public
              super(frameIn); // call the constructor of dialog
              creditLabel.setText(message);
              add("North",creditLabel);
              add("Center",remove);
              add("South",okButton);
              okButton.addActionListener(this);
              setLocation(150,150); // set the location of the dialog box
              setVisible(true); // make the dialog box visible
         } // End Public
         public void actionPerformed(ActionEvent e) { // Begin actionPerformed
    //          dispose(); // close dialog box
         } // End actionPerformed
    } // End Class
    MobileGame
    import java.awt.*;
    import java.awt.event.*;
    class MobileGame extends Panel implements ActionListener { // Begin Class
         The Buttons, Labels, TextFields, TextArea 
         and Panels will be created first.         
         private int noOfGames;
    //     private GameList list;
         private Panel topPanel = new Panel();
         private Panel middlePanel = new Panel();
         private Panel bottomPanel = new Panel();
         private Label saleLabel = new Label ("Java Games For Sale",Label.RIGHT);
         private TextArea saleArea = new TextArea(7, 25);
         private Button addButton = new Button("Add to Basket");
         private TextField add = new TextField(3);
         private Label currentLabel = new Label ("Java Games For Sale",Label.RIGHT);
         private TextArea currentArea = new TextArea(3, 25);
         private Button removeButton = new Button("Remove from Basket");
         private TextField remove = new TextField(3);
         private Button purchaseButton = new Button("Purchase");
         private ObjectList gameList = new ObjectList(20);
         Frame parentFrame; //needed to associate with dialog
         All the above will be added to the interface 
         so that they are visible to the user.        
         public MobileGame (Frame frameIn) { // Begin Constructor
              parentFrame = frameIn;
              topPanel.add(saleLabel);
              topPanel.add(saleArea);
              topPanel.add(addButton);
              topPanel.add(add);
              middlePanel.add(currentLabel);
              middlePanel.add(currentArea);
              bottomPanel.add(removeButton);
              bottomPanel.add(remove);
              bottomPanel.add(purchaseButton);
              this.add("North", topPanel);
              this.add("Center", middlePanel);
              this.add("South", bottomPanel);
              addButton.addActionListener(this);
              removeButton.addActionListener(this);
              purchaseButton.addActionListener(this);
              The following line of code below is 
              needed inorder for the games to be  
              loaded into the SaleArea            
         } // End Constructor
         All the operations which will be performed are  
         going to be written below. This includes the    
         Add, Remove and Purchase.                       
         public void actionPerformed (ActionEvent e) { // Begin actionPerformed
         If the Add to Basket Button is pressed, a       
         suitable message will appear to say if the game 
         was successfully added or not. If not, an       
         ErrorDialog box will appear stateing the error. 
              if(e.getSource() == addButton) { // Begin Add to Basket
    //          GameFileHandler.readRecords(list);
                   try { // Begin Try
                        String gameEntered = add.getText();
                        if (gameEntered.length() == 0 ) {
                             new ErrorDialog (parentFrame,"Feild Blank");
                        } else if (Integer.parseInt(gameEntered)< 0
                                  || Integer.parseInt(gameEntered)>noOfGames) { // Begin Else If
                             new ErrorDialog (parentFrame,"Invalid Game Number");
                        } else { // Begin Else If
                             //ADD GAME
                        } // End Else
                   } catch (NumberFormatException num) { // Begin Catch
                        new ErrorDialog(parentFrame,"Please enter an Integer only");
                   } // End Catch
              } // End Add to Basket
         If the Remove From Basket Button is pressed, a  
         a suitable message will appear to say if the    
         removal was successful or not. If not, an       
         ErrorDialog box will appear stateing the error. 
         if(e.getSource() == removeButton) { // Begin Remove from Basket
              try { // Begin Try
                        String gameEntered = remove.getText();
                        if (gameEntered.length() == 0 ) {
                             new ErrorDialog (parentFrame,"Feild Blank");
                        } else if (Integer.parseInt(gameEntered)< 1
                                  || Integer.parseInt(gameEntered)>noOfGames) { // Begin Else If
                             new ErrorDialog (parentFrame,"Invalid Game Number");
                        } else { // Begin Else If
                             //ADD GAME CODE
                        } // End Else
                   } catch (NumberFormatException num) { // Begin Catch
                        new ErrorDialog(parentFrame,"Please enter an Integer only");
                   } // End Catch
              } // End Remove from Basket
         If the purchase button is pressed, the          
         following is executed. NOTE: nothing is done    
         when the ok button is pressed, the window       
         just closes.                                    
              if(e.getSource() == purchaseButton) { // Begin Purchase
                   String gameEntered = currentArea.getText();
                   if (gameEntered.length() == 0 ) {
                        new ErrorDialog (parentFrame,"Nothing to Purchase");
                   } else { // Begin Else If
                        new CreditDialog(parentFrame,"Cost � 00.00. Please enter Credit Card Number");
                   } // End Else               
              } // End Purchase
         } // End actionPerformed
    } // End Class
    RunMobileGame
    import java.awt.*;
    public class RunMobileGame { // Begin Class
         public static void main (String[] args) { // Begin Main
              EasyFrame frame = new EasyFrame();
              frame.setTitle("Game Purchase for 3G Mobile Phone");
              MobileGame purchase = new MobileGame(frame); //need frame for dialog
              frame.setSize(500,300); // sets frame size
              frame.setBackground(Color.lightGray); // sets frame colour
              frame.add(purchase); // adds frame
              frame.setVisible(true); // makes the frame visible
         } // End Main
    } // End Class
    EasyFrame
    import java.awt.*;
    import java.awt.event.*;
    public class EasyFrame extends Frame implements WindowListener {
    public EasyFrame()
    addWindowListener(this);
    public EasyFrame(String msg)
    super(msg);
    addWindowListener(this);
    public void windowClosing(WindowEvent e)
    dispose();
    public void windowDeactivated(WindowEvent e)
    public void windowActivated(WindowEvent e)
    public void windowDeiconified(WindowEvent e)
    public void windowIconified(WindowEvent e)
    public void windowClosed(WindowEvent e)
    System.exit(0);
    public void windowOpened(WindowEvent e)
    } // end EasyFrame class
    ObjectList
    class ObjectList
    private Object[] object ;
    private int total ;
    public ObjectList(int sizeIn)
    object = new Object[sizeIn];
    total = 0;
    public boolean add(Object objectIn)
    if(!isFull())
    object[total] = objectIn;
    total++;
    return true;
    else
    return false;
    public boolean isEmpty()
    if(total==0)
    return true;
    else
    return false;
    public boolean isFull()
    if(total==object.length)
    return true;
    else
    return false;
    public Object getObject(int i)
    return object[i-1];
    public int getTotal()
    return total;
    public boolean remove(int numberIn)
    // check that a valid index has been supplied
    if(numberIn >= 1 && numberIn <= total)
    {   // overwrite object by shifting following objects along
    for(int i = numberIn-1; i <= total-2; i++)
    object[i] = object[i+1];
    total--; // Decrement total number of objects
    return true;
    else // remove was unsuccessful
    return false;
    ErrorDialog
    import java.awt.*;
    import java.awt.event.*;
    class ErrorDialog extends Dialog implements ActionListener {
    private Label errorLabel = new Label("Message space here",Label.CENTER);
    private String errorMessage;
    private Button okButton = new Button("OK");
    public ErrorDialog(Frame frameIn, String message) {
    /* call the constructor of Dialog with the associated
    frame as a parameter */
    super(frameIn);
    // add the components to the Dialog
              errorLabel.setText(message);
              add("North",errorLabel);
    add("South",okButton);
    // add the ActionListener
    okButton.addActionListener(this);
    /* set the location of the dialogue window, relative to the top
    left-hand corner of the frame */
    setLocation(100,100);
    // use the pack method to automatically size the dialogue window
    pack();
    // make the dialogue visible
    setVisible(true);
    /* the actionPerformed method determines what happens
    when the okButton is pressed */
    public void actionPerformed(ActionEvent e) {
    dispose(); // no other possible action!
    } // end class
    I Know there are alot of files. Any help will be much appreciated. Once again, Many thanks in advance

    setSize (600, 200);orpack ();Kind regards,
      Levi
    PS:
        int i;
    parses to
    int i;
    , but
    [code]    int i;[code[i]]
    parses to
        int i;

  • How do you set the frame size?

    Trying to set a frame size for 1920px X 1080px but can't see where to set this in a new project?

    Frame dimensions are a property of the sequence, not the project. A project can contain multiple sequences with different properties.
    File>New>Sequence opens a dialog where you can choose a preset or configure custom settings. Several of the preset groups have 1920x1080 options.
    Asssuming you have footage of those dimensions that you'll be using in the sequence, then you can simply create a sequence from an asset. Either drag it to the New Item button in the Project panel's lower right corner, or right-click it and select New Sequence from Clip.

  • How to set a frame size

    Hi
    I am tring to create a window with some menus on it. I have set a size to the window as (400,400). The trouble is when the application is run a small sized window is displayed on the top left corner as opposed to a 400*400 window. Although I can drag the widow to expand it, I was wondering if there was a way to set window's size.
    Any help is greatly appreciated.
    Thanks in advance
    * GUI.java
    package pick;
    import java.awt.Frame;
    import java.awt.Menu;
    import java.awt.MenuBar;
    import java.awt.MenuItem;
    import java.awt.Panel;
    import java.awt.event.ActionEvent;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowListener;
    import Drawing2d.*;
    * @author venkat
    public class GUI{
        public Frame frame = new Frame();
        boolean partButtons = false;
        Pick1 pick1;
         Sketch sketch;
    //   JOptionPane AB = new JOptionPane("sgadfg ",javax.swing.JOptionPane.PLAIN_MESSAGE);
    //   java.awt.Dialog AboutD =new java.awt.Dialog(frame);
        public GUI(){
            //Menubar
            MenuBar mb = new MenuBar();
            //Menus
            Menu File = new Menu("File");
    //      File.setLabel("File");
            mb.add(File);
            Menu Edit = new Menu();
            Edit.setLabel("Edit");
            mb.add(Edit);
            Menu View = new Menu();
            View.setLabel("View");
            mb.add(View);
                Menu Orient = new Menu();
                Orient.setLabel("Orient");
                View.add(Orient);
            Menu Insert = new Menu();
            Insert.setLabel("Insert");
            mb.add(Insert);
            Menu Help = new Menu();
            Help.setLabel("Help");
            mb.add(Help);       
            frame.setSize(400,400);
            frame.pack();
            frame.setVisible(true);
            frame.addWindowListener(new MyWindowListener());
    class MyWindowListener implements WindowListener {
    //Do nothing methods required by interface
    public void windowActivated(WindowEvent e) {}
    public void windowDeactivated(WindowEvent e) {}
    public void windowIconified(WindowEvent e) {}
    public void windowDeiconified(WindowEvent e) {}
    public void windowOpened(WindowEvent e) {}
    public void windowClosed(WindowEvent e) {}
    //override windowClosing method to exit program
    public void windowClosing(WindowEvent e) {
        System.exit(0); //normal exit
    }

            frame.setSize(400,400);
            //frame.pack();//<----------------
            frame.setVisible(true);

  • JRE 1.6. 0_01 is giving issues in message dialog box size

    Hi There,
    I am displaying message dialog for one of my web application. To resize the dialog automatically, I have set getPrefferedSize() property.
    This is working fine with JRE 1.5.0_11 and all lower version, even ok with 1.4.x. But if I am viewing the applet in a browser having JRE 1.6.0, dialog box size is automatically streatched. Height of the dialog box is increased automatically more than the desktop height. I can not view top & bottom area of the dialog box on my desktop.
    Please guide me why is this issue only with JRE 1.6.0 and what should I do to eliminate & resolve it.
    Thanks.

    Really? I thought all official versions would be downloadable through webstart. I'm curious why would Sun not make them available. Now I need to explain to my higher-ups why I promised to get webstart to automatically update all our user's JRE but now failed to make good. :-(
    Regarding the printing problem: With b105 the printouts would have text that is upside, mirrored and cropped. It was a total mess. The problem is reproducible. We manually upgraded some users to b106 and the problem disappeared completely. I think Sun fixed it in 106 but now the problem is getting all our users onto JRE b106.
    Java Webstart is supposed to do this for me but now it appears to be failing me big time.

  • Application Dialog fonts change with change in Themes....

    Hi
    In my Application, alongwith other items like frame and dialog titles, the dialog controls like labels and buttons also change with the change in font styles and sizes.
    Expected behaviour: The texts on the buttons and other controls of the dialogs should not change....
    Please suggest...??
    I am not explicitly setting any font sizes to the controls of the dialogs (only taking the default values assigned) , do i need to set them explicitly or is there any other solution,,,?

    You can't change the fonts.
    In preferences you can modify the darkness and lightness of the whole program. Go to Edit > Preferences > User Interface and move the brightness slider. You might find a spot where the text is easier to read.

  • Scanning size with HP 2570

    I've been having a problem scanning documents with my HP 2570 all-in-one printer-scanner as far as the size goes.
    The window that gives the size I want it to scan in as says it's 100 per cent, yet it scans in almost 3 times bigger. When printing what I scanned in, if I set the print size to 36 percent it will print the original size.
    Does anyone have any idea what may be causing the problem??
    Thanks,
    Barry

    Hestor
    Welcome to the HP Community Forum.
    I don't know if this will fix the problem, but one of the first things you can do is to take out the old software and install a fresh copy and see if that takes care of it.  Sometimes this is all that is needed.
    Out with the Old:
    If you are using a USB cable, be sure to disconnect the cable before starting this procedure.
    Control Panel > set icon view > Programs and Features >
    Scroll down, find the Printer program > Right-Click on the program > Uninstall
    Repeat these steps for each occurrence of your printer's name until none remain in the list.
    Restart / Reboot the computer and log in
    In with the New:
    Install Full Feature Software – Printer
    There are more Troubleshooting tips in your printer's Support pages that may provide some additional help, too.
    Click the Kudos Thumbs-Up to say Thank You!
    And...Click Accept as Solution when my Answer provides a Fix or Workaround!
    I am pleased to provide assistance on behalf of HP. I do not work for HP. 
    Kind Regards,
    Dragon-Fur

  • Print Module - Set Explicit Font Sizes

    In the Print Module Identity Plate can Lightroom set font size explicitly instead of using only a % scale factor?
    The scale factor is a great idea but it would be a lot more convenient at times to set the font size explicitly to 10 or 12 or whatever so it could carry over to other titles if you want all your titles to print in a specific font size (e.g. 12 points). That's already possible with Vibrance, Recovery and a host of other settings (including the Identity Plate scale factor itself!) and it's very valuable to be able to have those exacting controls.
    Thanks,
    Robert

    Ian,
    I'd be very pleased if I'm doing something wrong. From what I see the Identity Plate supports only one font size, and only for the most recent photo. When I choose Edit and type in a new title of a different length Lightroom changes the size of the font (the longer the title, the smaller the font and vice versa). Try this:
    1) Open Identity Plate and title the picture "Hello".
    2) Change the title to "I just love Adobe Lightroom so very much!"
    The title will be smaller. Lightroom seems to disregard the Identity Plate font size.
    I just tried your recommendation and no matter how I changed the Identity Plate font size in the Print module (e.g. from 38pt to 8pt) the photo's title text size barely changes, I have to use the Scaling slider every time. That font sizing functionality only works for me in the Library module when I'm creating my actual Identity Plate.
    Every time I change pictures I have to re-do this step. The way I'm dealing with this is changing the scaling factor (or with your recommendation, the font size) every time for every different-length title and/or enlarging/shrinking the title box for each photo.
    As I explained in my other reply to your other post, this is very time-consuming when you're printing 50-100 titled photos in a single day/weekend (not to mention the fact that it's physically impossible to set every scaling factor so all titles print exactly the same size font).
    It would be a lot better for Lightroom to automatically save all the print parameters the way it saves all other of the picture's metadata.
    If you could share an easy way to make that much faster I'd be quite grateful.
    Robert

  • How can I get a tab to open in an oversize jpg image in its original size with scroll bars when I click on a link?

    I have a small program for storing my genealogy names and jpg images of the census pages where each name is found. The images have a thumbnail link that opens in a new tab to view the actual oversized census page. In the new tab the census page is small and not readable. How do I get the jpg image to appear in its original size with schroll bars so I can read the census in the firefox browser without using the zoom feature. It takes several clicks on the zoom to get the image to a readable size and that is time consuming, especially when I have several images opened.

    That works, thank you!
    Could I suggest that this feature (the ability to turn off or turn on the auto-resize of images) be part of the Options tab on Firefox? I think it's a setting that some users might want to change fairly often--even toggle back and forth on. It's a little annoying to have to go into about:config every time to do this.

  • How can I set the font size of a form field in the fdf file?

    I need to dynamically set the font size of a field to accommodate text of varying length, automatic font size won't work in this case. It seems like this can be done in the FDF but I have tried several variants without success. Could someone help out with a real example of what the syntax in the fdf should look like.
    I am using Acrobat Professional 8.1 but the created fdf will need to work with Reader also.

    I think that the font size has to be set in the form itself, not the FDF.

Maybe you are looking for