How to fix the position of JInternal frames added in JFrame

Hay Frnds, I am having a problem. I have a JFrame ,in which i have added five JInternalFrames. My problem is that i want to fix the position of thaose Internal frames so that user cant move them from one place to other. Is there any way to fix there position. Plz reply as soon as possible. Its very urgent.
Thanks.

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.

Similar Messages

  • How to fix the position of table columns.

    Hay all,
    Can anybody tell me that how to fix the position of columns in a table.By default the columns can be moved to any position in the table.
    Regards,
    Sharad Agarwal

    table.getTableHeader().setReorderingAllowed(false);this will do...
    Regards,
    Byju

  • How to fix the position of different component?

    Hay all,
    Can anybody tell how to fix the position of any component so that they cant be moved from there initial positiion
    Regards,
    Sharad Agarwal

    Set layout to null and set bounds of the component to whatever you like.

  • How to fix the position of JInternalFrames added in JFrame.

    Hay Frnds, I am having a problem. I have a JFrame ,in which i have added five JInternalFrames. My problem is that i want to fix the position of thaose Internal frames so that user cant move them from one place to other. Is there any way to fix there position. Plz reply as soon as possible. Its very urgent.
    Thanks.

    import javax.swing.plaf.basic.*;
            BasicInternalFrameUI internalframeUI = (BasicInternalFrameUI)frame1.getUI();
            internalframeUI.getNorthPane().addMouseListener(new MouseAdapter() {
                public void mouseReleased(MouseEvent evt) {
                    frame1.setBounds(0, 0, frame1.getWidth(), frame1.getHeight());
            });

  • How to fix the position of controls, so table expands into whitespace and doesn't push lower controls down (invoice report in SSRS 2005)

    I am designing an invoice report. There are some controls at the top of the report (company logo, date, invoice number etc), followed by a table listing the items in the invoice, followed by some controls at the bottom (subtotals, returns address etc). The report should always print onto a single page.
    I want the controls at the bottom to have a fixed position on the page. There is sufficient whitespace between these controls and the table above for the table to expand to list many items. However whenever it expands it pushes the lower controls down. This results in them spilling onto a second page.
    Is there a way to fix the position of controls and suppress the "gets pushed down when controls above expand" effect?

    Thanks for that. I found a good solution using rectangles here: SQL Server 2005: Report Design Best Practices and Guidelines
    Here's the relevant part (see underlining):
    Using Rectangles to Keep Objects Together
    Rectangles in Reporting Services can be used either as graphical elements or as containers of objects. As object containers, they keep objects together on a page and control how object move and push each other.
    To keep multiple objects together on a page, put the objects within a rectangle. You can then put a page break before or after the rectangle by using the PageBreakAtStart or PageBreakAtEnd properties for the rectangle.
    Using Rectangles to Control Item Growth and Displacement
    Items within a rectangle become peers of each other and are governed by the rules of how peer items are positioned on the page as they move or grow. For example:
    Items will push or displace each other within the rectangle.
    Items will not push or displace items outside the rectangle, because they are not their peers.
    If necessary, a rectangle will grow to accommodate the items it contains.
    You can use this logic to your advantage when dealing with objects that expand. For example:
    If you want to leave a blank space in your report for a table to expand into, group the blank space and the table in the same rectangle. When the table grows, it will push the blank space .
    If you want to prevent a matrix from pushing items off the right edge of the page, put the matrix within a rectangle with blank space to its right. Now, the matrix is no longer a peer to the other item on the page and will not be able to push it until the matrix can no longer be contained within its rectangle.

  • Please help me ! how to fix the position of NSWindow ?

    Hello everybody,
    I have a NSwindowController < NSWindowDelegate > (with windowWillUseStandardFrame implemented) which is supposed to fix the position of my window.
    Except never this method is called ! Nevertheless there is indeed a delegate...
    In fact in the launch of my soft, the system makes little as it wants: it cascades me windows or keeps me the last position of every window.
    I tried to deactivate the cascading, the same problem...
    All the directives concerning the NSWindow seem to be ignored !
    I do not know if it is a pure coincidence, but since I passed of a macBook 13p under 10.6 (XCode 4.0.1) in a mini mac with screen 24p under 10.7 (XCode 4.3), everything seems not to work any more as before ?!
    I wish I can align in the topleft of my screen all my windows (I tried all the concerned methods, the same problem) to loosen me of the resolution of the screen.
    If you have an idea, it will be welcome.
    Thanks you in advance.
    FM.

    OUNAS wrote:
    I find very openly the management of the positioning of a window very complex while it is a basic task !
    Thanks.
    FM
    Bonjour Ounas,
    It is not complex, within Cocoa simple things are easy to implement (and complex are possible). If you find it the other way you made a mistake somewhere.
    In your case I would start by putting a breakpoint in the methods and run the application in Debugg Mode.
    And if :
    - your method is not called
    - your window is 0x0 inside the method
    Closely look in Interface Builder if the connection is correct between your window and its variable in code and if your controller object is well assigned as its delegate. For that just select the window object in the nib and do a right/control click on it to see if it is well connected with controller's objects (alternatively use the Menu -> View -> Utilities -> Show Connections Inspector).
    As for the time to call your "fix" method what about the "- (void)windowDidLoad" call in your window controller subclass ?
    I had lots of troubles to get it called when I started with Cocoa. For it to works you have to be sure the window is well connected in IB to your window variable. And you need to load that f*¿!^ fichue window by any call to it via your controller like
    //After call window is 0x0 in the debugger if you look at it by unfolding the triangles self>controller>NSWindowController
    controller = [[RTWindowController alloc]init];
    //This one will trigger the controller's windowDidLoad method
    [controller showWindow:self];
    //a simple [controller window] is enough to bring it to life
    hth
    laurent

  • How to fix the positions of two Mail.app viewer windows on the screen?

    I use Mail.app as my main IMAP Mail application. I work with two Mail viewer windows which I position on the screen so that the upper window shows the Inbox and the lower window the Send-box. The windows are aligned to each other and do not overlap. Fine.
    But when I quit Mail.app and open the program again, the windows have forgotten their postions. They "jump" to a new location on the screen. This is in contrast to all other applications I use. Another bad example of window managment is the Mail.app-Preferences window which also does not stick to a given position.
    Is this a (known?) bug or does it only happen on my Macs? (two: one in the office, one at home, both running 10.4.6)

    I guess the difference is that my description text is longer.
    Try this text for a new rule:
    "From: blacklisted senders 1 - move to SPAM-blacklisted-addresses"
    When you want to see this text completely with the default font, you will need to enlarge the Preferences window for "Rules". After that, click to "Signatures": the window stays at the enlarged width. Then click on any of the other areas in Preferences, and the window goes back to the "normal" width. When you then click on either "Signatures" or "Rules", the Preferences window will stay at the "normal" width (resulting in a truncated display of the rule description text).
    Also: when you have moved the Preferences window to a position not covered by a (large) viewer window to access it with a mouse click, close the window and re-open Preferences, it is back to a position covered by the viewer window. Again not accessible when the viewer window is the front-most Mail.app window. BTW: the "Activity viewer" window does a better job in sticking to a fix position.

  • 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 do you fix the position of an object vertically only ("static" position horizontally)?

    I want to fix a "title" bar of a table vertically, but allow it to scroll with the rest of the page content horizontally. At the moment it's position is "fixed" which fixes the position vertically but horizontally too. I would like to have the coloured cells move horizontally with the rest of the table in the case that the browser window is not wide enough.
    Can this be done? If so, how?
    (this picture shows that the horizontal positions are different - would like them to remain in line with each other)
    Sorry if this is a silly question, I've only started using Dreamweaver yesterday... Thank you in advance for any help and advice.

    If you want to align your item horizontally center, left or right (along with other website content), you can put that item within a fixed position container, then align the item within the container however you see fit.
    <html>
    <head>
    <title></title>
    </head>
    <body>
    <div id="container" style="position:fixed; top:0px; height:100px; width:100%; border:1px solid orange;">
         <div id="item" style="width:300px; margin:auto; border:1px solid black">Some Content</div>
    </div>
    </body>
    </html>
    In the simplified example above, the container div is fixed to the top of the page, the item div is also then fixed at the top, however using css, it is  centered to the browser window. The border properties are there for illustrative purposes

  • 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 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 lock the position of text in XML RTF

    Hi Experts,
    I am working in XML Publisher reports. I am working on invoice report, i have following issue.
    RTF:
    <?for-each:headergroup?> --header
    <?header-data1?> <?header-data2?>
    --inside table
    <?for-each:linegroup?> --lines
    <?line-data1?> <?line_data2?>
    <?end for-each?> --lines
    --end of table
    <?Total?>
    <?end for-each?> --header
    **My requirement is, if i get more line data, it will push the <?Total?> to next page, but i want to fix the position of <?Total?> at same place. if line data is more, just lines should go to next page,but <?Total?> should be in the same position.**
    Kindly help.
    Thanks in advance.

    Hi,
    Thanks for your reply. Actually my requirement is, i have 2 page template.
    RTF:
    page1
    <?for-each:headergroup?> --header
    <?header-data1?> <?header-data2?>
    --inside table
    <?for-each:linegroup?> --lines
    <?line-data1?> <?line_data2?>
    <?end for-each?> --lines
    --end of table
    <?Total?>
    <?end for-each?> --header
    page2
    SOME DESCRIPTION IS THERE RECORDING INVOICE
    Output Using above RTF:
    Page1:
    header-data1 header-data2
    line-data1 line-data2
    Total
    Page2:
    Description.
    page 3
    header-data1 header-data2
    line-data1 line-data2
    Total
    page 4:
    Description.
    After each header and line info, it will print Description.
    Till now it's perfect.
    Requirement: In first page, i need to have a footer, no footer in second page.
    For this, i put a section break in page1, now there is no footer in page2.
    But the output is coming like below.
    page1:
    header-data1 header-data2
    line-data1 line-data2
    Total
    page2
    header-data1 header-data2
    line-data1 line-data2
    Total
    page3
    header-data1 header-data2
    line-data1 line-data2
    Total
    page4
    Description.
    After keeping section break, it's not printing the DESCRIPTION after header and line info page.
    Could somebody help me, how to achieve the DESCRIPTION after header and line info with no footer on second page.
    Kindly help.
    Thanks in advance.

  • Why is the position of key frame BEFORE scene changes not after?

    Why is the position of I frame BEFORE scene changes not after?
    And, why doesn't MovieVideoChart show any I frames other than those that correspond to periodic "key frames every X frames"? Is it reading meta data and not really showing where the real existing I frames are located? I.e. WYSIAL (what you see is a lie)? If so, where can I get an affordable tool that will let me examine my files in this regard?
    I have put compression and chapter marks at scene changes in FCP and have exported with markers for DVDSP (both chapter and compression).
    I have read on this forum (somewhere) that when insert key frames every X frames is selected, Compressor is still going to insert key frames automatically at key frames.
    When I last encoded with H.264 in Compressor, I selected option to insert I key frame every 90 frames (fps=29.97).
    When I jump to chapter in my encoded video, where I had place a key frame at a cut, I end up with a chapter at the frame BEFORE the cut.
    I will try moving my chapter/compression marks a frame ahead and see if that helps.
    Certainly, others must have been plagued by this problem.
    When encoding with MPEG2 for DVD, the same thing happens.
    It is a real problem. I get one frame appearing before the cut in chapter skips.
    Hope someone can illuminate this problem.

    Hi there
    As you have seen, RoboHelp doesn't understand how to create the layers you are wanting to achieve the effect in Word. It simply brings the images in as separate objects.
    Basically there are two approaches you might consider.
    You could insert Positioned Text Boxes and configure them to present the images as you want. If you take this approach, you will likely find yourself struggling to maintain the positioning consistently as well as noticing text flow issues. Personally, I'd avoid that approach.
    The other approach involves displaying the images in your Word document so that you see them as intended, then screen capture so you grab the combined image. Then save that combined image and use it instead of the separate images in RoboHelp. This is the approach I'd suggest and that I use myself.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • How to fix the above mentioned, *"special Incoming Closed margins"*.

    Valuation runs (TPM1) fails with the error below:
    Unfixed bus. trans. with posting date 02/23/2012 before key date (long text)
    Message no. TPM_TLV1028
    Diagnosis
    The position that is to be valued contains a position-relevant business transaction Close margin listed options and futures in status Scheduled with posting date 02/23/2012 This is earlier than the valuation key date.
    Question is how to fix the above mentioned, "special Incoming Closed margins".
    PLease note that TPM18 or TBB1 does not work....
    Regards,
    Rahul

    Hello Lorenz,
    I get no flows selected but report tpm13 clearly shows there is an OUTGOING CLOSED MARGIN update type in scheduled status ?
    Any ideas. This issue has been reported before but no results.
    Regards,
    Rahul

  • How to fix the BitRate & FrameRate

    hi all.
    I met a problem, how to fix the BitRate and FrameRate when sent by transmitter to the network using RTP protocol, and received by receiver at the same BitRate and FrameRate? Is there a mechanism in JMF to update the BitRate and FrameRate using the RTCP protocol?
    thanks.

    hi all.
    after creating the processor for the input datasource from a camera, i use following codes to set the framerate for the processor:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    FrameRateControl fr=(FrameRateControl)processor.getControl("javax.media.control.FrameRateControl");
    BitRateControl br=(BitRateControl) processor.getControl("javax.media.control.BitRateControl");
    br.setBitRate(1000000);
    System.out.println("frame rate= "+fr.setFrameRate(30)+"fps");
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    the output is:
    ~~~~~~~~~~~~~~~~~
    frame rate= -1.0fps
    ~~~~~~~~~~~~~~~~~
    according to the API documents of JMF2.1.1e, this output means "Returns -1 if it is unknown or it is not controllable".
    what should do to set the framerate for the processor? many thanks.

Maybe you are looking for

  • Error when creating a new Portfolio

    Hi guys, When I try to create a new Portfolio, I get the following error message:                "The value of the mandatory input field Portfolio Type is initial" This error occurs in spite of the field being populated with a valid Portfolio Type. C

  • I forgot apple id and passworld what soulation

    hi sir how are u .                         Me Muhammad Shamshad from Pakistan ans working Saudi Arabia as a Graphics Designer . sir have a bog problem .sir i buy the i phone 4s use (old).3 months use my i phone to much slow after i reset i phone then

  • How to find table / field where condition records are saved?

    Hi, We want Sales Order Rate ( Condition type ZR00 calculated with backward pricing ), as a column in a Z report. I am not able to find out the table / field where system saves condition records for this condition type. I can only see structure. Plea

  • How to update Firmware on a Mac?

    How to Update the Firmware of my HP LaserJet P2055dn connected via ethernet to my Mac? The Download just leave me with a .rfu file. How can I use this? This question was solved. View Solution.

  • Issues with Adobe Flash Professional CS6

    I have been using Adobe Flash Professional CS6 and have had a few issue with it. -The program crashes -The program stops responding quite often whilst I am working and will take a few seconds to load - It will sometimes glitch and my clicks will be d