How to fix the size of panel

Hi All,
I have an applet which internally contains JPanel. I am using border layout for that.
If size of the applet is increased, then size of this panel is being increased and the center part of the panel is getting effected(expanded).
My requirement is to increase the size of applet but keep the panel size as previous. In otherwords the increased size of applet should get added at the bottom instead of the center.
I tried with setMaximumSize() and setPreferredsize(). That didn't work for me.
Any body please help.
Regards,
Swathi.

Hi,
when u adding panel in ur applet, default it can display in center(borderlayout.center), u can specify in the borderlayout-south, north..
it may be useful for ur requirement.

Similar Messages

  • How to fix the size of JFrame

    Hi Friends,
    How to fix the size of JFrame so that it can not br able to resize beyond a
    certain limit .
    i want this because i my screen if it is resized as small then the component of screen changes there location and position.
    plz help.

    You can... sort of
    The setSize() method is nasty because you don't get the event until you release the button, so the frame resizes and then snaps back. However, if you put the ComponentListener on the frame's JRootPane, you get a stream of resize events (because the window typically needs to be able to dynamically redraw itself). You can still use the setSize() method, but it is potentially confusing to the user, because the window border gets disconnected from the cursor, and as the mouse is moved further, the frame flickers between its instantaneous new size and max size.
    For a better user experience, use Robot to programmatically reposition the mouse back to the screen location equivalent to the maximum dimension.

  • How to fix the size of the frame or window?

    Hi,
    Do you know how to fix the size of the frame or window so that the user cannot minimize or maximize it?
    Thanks.

    Frame's setResizable(false);.

  • How to fix the size of table data in html

    I want to fix the size of table data in html. ie if i want to insert only 50 char in a <td> field then it contain only 50 character, after that it switched to another line and contain the remaining character. Means <td> field wil not get automatically adjust there size according to data.

    you cant specify how many characters a td cell can have but u can specify the pixel width of a td cell
    <td width=50>
    as long as you have wrap text on, then text will not force the box size over the 50 pixels
    this wont limit it to only 50 chars though, you will probably have to use some javascript to cut the string down to size (unless youre using something like php or asp then that will do the trick too)

  • How to fix the size of the column in a table of ALV table  type?

    Hi all,
    I want o fix the size of the ALV column.
    Can any one help me out regarding this.
    Regards,
    Yugesh

    * Data declarations for instantiation
      DATA: l_ref_interfacecontroller TYPE REF TO iwci_salv_wd_table   ,
            l_ref_cmp_usage   TYPE REF TO if_wd_component_usage,
            l_value   TYPE REF TO cl_salv_wd_config_table   ,
    * Instantiate the ALV
      l_ref_cmp_usage =   wd_this->wd_cpuse_usg_alv_feclm( ) ."usg_alv_feclm is the name of your usage
      IF l_ref_cmp_usage->has_active_component( ) IS INITIAL .
        l_ref_cmp_usage->create_component( )                 .
      ENDIF                                                  .
    * Get model
      l_ref_interfacecontroller = wd_this->wd_cpifc_usg_alv_feclm( ).
      l_value = l_ref_interfacecontroller->get_model( )             .

  • How to increase the size of panel

    Hi All,
    I am trying to increase the size of the panel using setPrefferedSize, but it is no change in size of the panel.
    Is there any other factors which will effect the size of the panel.
    Any help is greatly appreciated.
    Thanks in advance,
    Roja.

    Is there any other factors which will effect the size
    of the panel.The size of your JPanel may depend on the layout policy of its container's LayoutManager (see the Swing tutorial).

  • How to fix the size of a multiple panels in jFrame

    Hi,
    In Jframe I added one rootPanel
    Inside rootPanel, I added two more panels
    1. userInputPanel which intern contains one textField & one jLabel
    2. buttonPanel which intern consists of two buttons
    So I need to view, always userInputPanel top side and buttonPanel below to the userInputPanel.
    But when I click on any button, the buttonPanel goes up (on top) of userInputPanel.
    any solution?
    Thanks
    -ms_shitole

    In Jframe I added one rootPanelI don't know what a rootPanel is or why you think you need to add one.
    The general code should probably be something like:
    frame.add(userPanel, BorderLayout.CENTER);
    frame.add(buttonPanel, BorderLayout.SOUTH);
    frame.pack();Read the section from the Swing tutorial on [Using Layout Managers|http://java.sun.com/docs/books/tutorial/uiswing/TOC.html] for more information and working examples.
    For more help create a [SSCCE (Short, Self Contained, Compilable and Executable, Example Program)|http://sscce.org], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • How to fix the size of split container.

    Hi All,
    I have a requirement to display 5 alv report grid report .For this requirement i split the container into 5 rows and display the report sucessfully.
    Now i need to fix size of split container's acoording to number of rows comes in alv report.Could you please let me know
    how to achieve that.
    Regards,
    Mohit

    hi,
    Try this article..
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/50f1786c-a627-2e10-07b9-fefe548376ad
    Regards
    Rajashiva Ramalingam

  • How to fix the size of a window object?

    Is there any way that I could use to stop the user from resizing a window interface, and also remove the MINIMIZE and MAXIMIZE buttons up the right coner of the window ?

    I don;t know about removing the min and max buttons, but you can use yourFrame.setResizable(false);

  • How to fix the decimal part(round) i.e. fix the size of float.

    how to fix the decimal part(round) i.e. fix the size of float.

    You can use BigDecimal to round of your number.
    float f = 5.678f;
    f = new BigDecimal(f).setScale(2, BigDecimal.ROUND_HALF_UP).floatValue();If you just want to display the float with a certain number of decimals, you can use java.text.DecimalFormat
    DecimalFormat df = new DecumalFormat("0.00"); // two decimals
    float f = 5.678f;
    System.out.println(df.format(f)); // should show up as 5.68

  • How to change font size on panels?

    How to change font size on panels?

    Peetwo wrote:
    Thanks for your response.
    The Martin Evening book on Lightroom 5 says that you can.  I can’t discern exactly how.
    Maybe, but you are asking in the Camera Raw forum, so I might be excused for not being telepathic.

  • Within redbox I can not click on a movie and get information about it, instead I get an error message that says that the situation may be temporary. yet i keep having the same problem. Do you have any idea how to fix the problem?

    Within redbox I can not click on a movie and get information about it, instead I get an error message that says that the situation may be temporary. yet i keep having the same problem. Do you have any idea how to fix the problem?

    Did you delete all receipts with iDVD in the file name  with either a .PKG or .BOM extension that reside in the HD/Library/Receipts folder and from the /var/db/receipts/  folder before installing the new copy?  If not then do so and delete the new application also.
    Click to view full size
    Then install iPhoto from the disk it came on originally and apply all necessary updaters: Apple - Support - Downloads
    OT

  • How to determine the size of selected text

    Hi
    I'd like to draw a box around some selected text (a textRange), however I can't figure out how to detemine the size or position of the text.  The overall size of a textFrame is possible to find (not sure about position), but when you've got just a few characters selected I don't see any way to get the size or position.  Any ideas?

    You may have to do some testing of your own with this… I tested here and 'think' its OK but could have overlooked something… For me the best way to get this data is to outline the type store the info in a variable then undo the outlining process… You can then continue your script with info in hand… An example that draws a box over each selected character… I cheated with only the one text frame but you can resolve that? You could easy use math.min & math.max to draw around an array of bounds… I didn't bother with a load of tests it expects selected text range as is… have fun…
    #target Illustrator
    textBoxer();
    function textBoxer() {
              var i, doc, sel, start, end, spaceB4, spaceInc, mat, grp, count, boxes;
              doc = app.activeDocument;
              sel = doc.selection;
              start = sel.characterOffset-1; // Not zero based…
              end = start + sel.length;
              doc.selection = null;
              spaceB4 = doc.textFrames[0].contents.substr( 0, start );  // Cheated here you will need to find parent frame…
              mat = spaceB4.match( /\s/g ); // Resolve the lost of white space characters before selection
              mat != null ? spaceB4 = mat.length : spaceB4 = 0;
              spaceInc = doc.textFrames[0].contents.substr( 0, end );  // Here too…
              mat = spaceInc.match( /\s/g ); // Resolve the lost of white space characters in selection
              mat != null ? spaceInc = mat.length : spaceInc = 0;
              grp = doc.textFrames[0].createOutline(); // Items in new group are last to first order
              app.redraw();
              count = grp.compoundPathItems.length;
              boxes = Array();
              for ( i = 0; i < count; i++ ) {
                        boxes.push( grp.compoundPathItems[i].visibleBounds );
              boxes.reverse(); // Fix the order
              app.undo(); // Bounce back…
              app.redraw();
              start = start - spaceB4;
              end = end - spaceInc;
              for ( i = start; i < end; i++ ) {
                                  doc.pathItems.rectangle( boxes[i][1], boxes[i][0], boxes[i][2]-boxes[i][0], -boxes[i][3]- -boxes[i][1], false );
              app.redraw();

  • Does anypne know how to fix the missing MSCVR80.dll file? Ive reinstalled itunes several timessysystem restores. Ive tried everything I can think of . Been sitting here all day and nightHELP!!!!!!!!!!!!!!!!!!!

    Does anypne know how to fix the missing MSCVR80.dll file? Ive reinstalled itunes several timessysystem restores. Ive tried everything I can think of . Been sitting here all day and nightHELP!!!!!!!!!!!!!!!!!!!

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support (if this won't uninstall move on to the next item)
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
    Please note:
    Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
    HT1925: Removing and Reinstalling iTunes for Windows XP
    HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    tt2

  • How to fix the column header width in BEx or WAD

    hi there!
    how to fix the column header width in BEx or WAD. because, depends on the column data, the column size varies. i want to fix the size so that i can maintain the consistency through out the report.
    thanks!
    Vam.

    Dear Vam,
    you can easily do that with css, search the source code of the executed web template for the td tag which is around your coloumn header, remember the style sheet class name it is ´displayed as class= in the td tag.
    Now you can add this code the beginning of your web template:
    </style>
    This will only work in Web.
    Regards
    Marcus

Maybe you are looking for