Layout Manger. Why?

Okay, here is my problem:
I am creating a GUI that pretty much represents a piece of paper with columns of data. To recreate this in Java I want to use a layout manager that doesn't mess with my sizing. I want X panel to go in Y location and I don't want it to stretch it out, but ALL the layout mangers that I use mess with my formats.
I figured out Absolute positioning and that has been my god send since it does EXACTLY what I want it to do, that is put panel X in poistion Y and not friggen mess with it.
Now the problem, I want to use scrollbars on the overall main panel that holds all the sub-panels but the Scrollbars just don't work. Period. It makes no sense to me.
How can I implement a absolute position layoutManger abd get scrollbars to work? Has anyone written something like this, and if so can they point me to the code?
And please don't point me to some tutorial on layout managers. I have read enough of them, and they are totally useless for me. I don't need some manager to keep track of my panel sizes. I want them all to be fix sized in fix locations, but no manager seems to be able to do that. When I use any of the managers they just ignore any line of code where I set the size or location of a panel. What ends up happening is my panels get stretched and repositioned all over the place. It drives me nuts.
If Java doesn't have a layout manager that implements Absolute positioning, then why don't they have a straight forward layout manager that implements relative positioning? Sheesh.

>
All i needed to do was set the preferred size
correctly. Problem solved. I didn't expect to read so
many java fan-boy responses, cause ya know, Java just
couldn't be over-engineered at all... no never...
What a Prig you are! Why are you looking at Java? If you want to use Java in earnest then you need to look at the libraries and understand how to use them. It just does not make sence to try to force Swing or any other library into the mould of your previous experience.
I program in Java, C++, Perl and Python. My favourite is C++ but I don't try to use the Java libraries as if they are C++ libraries. I try to under the libraries so that I can use them effectively.
Central to Swing (and AWT) is the concept of a layout manager. A layout manager allows you as a programmer to get the computer to layout your GUI components according to some simple to understand rules. Once you understand the rules you can save a lot of time and code. Time spent in understanding the layout managers is well spent and, if you continue with Swing, will be more than offset by the time saved in developing applications.
Your initial approach of "... tell me how to solve my problems but don't tell me to look at the tutorials ..." was bound to get the reaction it did. Your question has been asked so many times before in this forum and it is obvious that you didn't do a search before posting.
Bog off the the Basic forum.
Roger

Similar Messages

  • TThere are now two keyboard layouts" software and hardware" keyboard layout. Why does hardware one a

    Under Settings'/general/keyboards, There are now two keyboard layouts" software and hardware" keyboard layout.  I can easily just pic US in the software one, but the hardware one has three style choices of only arabic keyboards and it requires me to pick one.  So I still get arabic when I hit the globe.  If anyone knows how to solve this one (get rid of it!) i will respect u forever.
    On this discussion board i always hear, go to settings  keyboard and change to US. As explained above, that does not solve the problem, nor many other users I read on here have the same issue as I do.  VERY ANNOYING.

    You are might knight in shining armor.  If u road on,a white steed with a glass of grand marnier I'd marry u! Lol. Oh yea. Im already married to one. Seriously thanks dude, u have no idea how much this has driven me nuts that i couldn't even see an edit button?  Thanxs again!
    Lisa

  • After getting firefox 5.0.1, everytime I restart firefox, it resets my navigation toolbar layout. Why?

    I have windows 7 and I installed firefox 5.0.1. When I customize the location of the navigation toolbar buttons like home and back buttons, when I exit firefox and then open it again, it resets the buttons to default and the location of the buttons also.

    See:
    *http://kb.mozillazine.org/Corrupt_localstore.rdf

  • How do I remove a line in Layout?

    There is a line in section text layout that I wish to either remove or move around (shown as the selected red line). But I can't seem to delete or move them once I selected it in the layout. Why? Thanks!

    Thanks! It works. But if I apply the change to the section, it will wipe out all the images of all the sections... and I have a lot of images!
    What's the best way to remove that line and not cause too much images? Can I do it page by page?

  • Aperture doesn't save book layout, book disappears

    I start to create a book in Aperture. Then I quit Aperture. When I relaunch Aperture, the book no longer appears in the project. However, if I explore the database using "show package contents," I can see a file with the book's name. Why won't Aperture save my book layout? Why does the file appear to exist, yet the book doesn't appear in the project? Can I recover the in-progress layout?

    Yep, that did it! Rebuilt the library as instructed, and the book layout reappeared in the project. Many thanks for the simple and effective solution!

  • Why can't I increase the cache size in FF 4?

    OK, first of all, to be honest I really don't like FF 4. I see absolutely no advantages over the previous versions and I can't find anything to like about FF 4..
    One big and annoying factor (besides the how UI and layout) is why can't I increase the cache size?
    If I choose to manage it myself and override what the developers did, I can go to 1024 and that's it. If I want 5GB of cache, I'm out of luck because some coded decides how I want to manage my disk space? They're kidding, right?
    What the heck is the matter with these guys?
    This thing is so bad that I've resisted upgrading, I didn't have a choice when I upgraded to Ubuntu 11.04, it came with the package.. Yuk... I've been a FF user since late 2003 or early 2004... I'm about to part ways with this thing if they don't fix it...Even IE sucks less than this thing....
    None of my Windows machines are going to get 4 loaded if I can help it.. About 1 million people agree with me...

    correction.. It's not a million.. it's legion at this point..
    Google "I hate FF 4" and you'll get 40,900,000 results... I don't trust Google further than I can throw them, but 41 million people complaining about this thing? What a freakin travesty...

  • Asset screen layout

    hi,
    in as02, when i click the drop down list for class, i notice there is a tab called
    account assignment/screen layout.
    what actually is this screen layout?
    why has it got to do with account assignment?
    thanks

    Hello,
    The screen layout specifies the status of the fields in the asset master record. You use the screen layout to determine if fields are required entry or optional entry fields, or if they are suppressed completely, for example.
    In this step, you create only the keys and descriptions of the screen layout controls. You define the the field group rules for the screen layouts themselves in the step Master Data.
    In Account determination you set the account for posting of various transaction of asset for e.g.
    Acquisition of asset
    Dep of asset and sale of asset.
    Regards
    Ravi

  • Keyboard layout issue only with Windows 7, not Windows 8

    Hello,
    I have a strange behaviour with Remote Desktop on Windows 7. I have a RDS 2012R2 deployment, with TS Gateways, broker and remote desktop collection. I have published a RemoteApp.
    My issue is with the keyboard layout send by the client. My server is in English - Swiss French keyboard.
    With my Windows 8 client, keyboard in "French", the keyboard used in my RemoteApp is correctly set to "French"
    With my Windows 7 client, keyboard in "French", the keyboard used in my RemoteApp is set to "Swiss - French". This is not the correct layout.
    Why under Windows 7 the keyboard layout is not send correctly ? 

    Hi Sebastien,
    Initially please use latest RDP version 8.1 for windows 7 and check the result. 
    If you want the session to use the default keyboard layout stored in the user profile instead of the layout provided by the Remote desktop Server client after the user logs on to the Remote desktop Server computer, you can set the IgnoreRemoteKeyboardLayout
    registry value to 1. After users first connect to the Remote desktop Server computer, configure the default keyboard layout and input language that you want, and then log off. All later user logons will use the default keyboard layout and input language from
    the profile.
    To do so, please perform the following steps: 
    1. On the remote desktop server, click Start, click Run, type regedit, and then click OK.
    2. Locate and then click the following registry subkey:
     HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
    3. On the Edit menu, click Add Value, and then add the following registry information:
     Value name: IgnoreRemoteKeyboardLayout
    Data type: REG_DWORD
    Value data: 1
    4. Quit Registry Editor.
    After you first connect to the Remote desktop Server computer, configure the default keyboard layout and input language that you want, and then log off. All later user logons will use the default keyboard layout and input language from the profile.
    Hope it helps!
    Thanks.
    Dharmesh Solanki
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Alternative keyboard layouts

    Hey everyone,
    So I was considering making the move from QWERTY to a keyboard layout that's a little more efficient, so I thought I'd take a poll to see
    who is using what kind of keyboard layout and why.  I'm curious about Dvorak, programmer's Dvorak, and colemak, and have been researching each of their individual pros and cons. I'm thinking Dvorak sounds like the best out of all of the above, but colemak sounds relatively intregueing as well.  so what's your opinion?

    Just to let everybody know I am now 28 years old. I first learned how to type in typing class in junior high. I was using the Qwerty layout. The only nice thing I can say about the Qwerty layout is that it's available at any computer you want to use without any configuration.
    Then I looked online for a better way to type and more efficient. That's when I learned about Dvorak keyboard layout. This was about four years ago. I stuck with it for about two years. I felt my right hand was doing a lot more typing than my left hand. It felt too lopsided for me. But that's just my opinion. I went on the hunt for something better than Dvorak and I found the glorious Colemak keyboard layout.
    I have been typing with it ever since. My hands are a lot more comfortable and I can type faster now. It took me a month to actually get comfortable with the keyboard layout. If you actually go to this Java applet on Colemak's website.
    www.colemak.com/Compare
    You can just copy and paste a body of text and click on Calculate it will analyze the typing and compare the three different keyboard layouts. I just hope it becomes an ANSI standard like Dvorak has. I hope that happens in the future.
    I just want everybody to know there is a third option out there and its great. If ever Colemak goes away I will be going back to Dvorak. I will never learn the Qwerty keyboard layout ever again.
    Just wanted to give my two cents worth.

  • Web Version Layout Vs Professional Client Layout

    User specific layout saved in Web version can be utilized in Professional client ?
    I saved one layout in web version but same thing is not appearing in professional client with same user ID.
    Can anyone guide with steps?
    Edited by: 1004116 on May 4, 2013 12:48 PM

    It's not currently possible to share Windows and web client layouts. Why? I can only guess that it's because it would be a technical feat since the output is drastically different even though the basics are similar. Good user request though! I sincerely mean it since its all stored in the same DB.

  • Dragging one cell value(copy) across columns or across rows in ALV layout

    Hi friends,
    In bps layouts, data is displayed in ALV grid as interface. At plng folder level, can i incorporate excel feature like dragging one cell value across columns or across rows?  Simply if user enter one value in cell of ALV grid, that should be copied automatically across rows/columns while dragging?
    Second question, even i chose in layout builder excel as interface, that layout showed in plng folder as ALV grid layout. Why it happens so. I read documentation in UPSPM of that particular plng folder, it tells same thing(even if u choose excel, it will show in ALV only). So how can i get excel interface in plng folder?
    Regards,
    Kumar

    requested property is not possible at ALV layout level. Provided text document load facility to user. So user can directly load excel to plng folder.
    Issue resolved.

  • Choosing application-layout

    Hi everyone,
    i don't know if i'm right here but i didn't found where else to post.
    So here is the problem: I've developed a desktop application in java for which i have used the grouplayout since it seemed to me the easiest way to place the elements when i worked with the eclipse and netbeans framework. Now the elements are all placed related to my screen and my screen is 19". When i tried to install it on another computer came up the big problem. Some windows were so big that they couldn't be displayed as in my screen. Somewindows elements where not to be seen and and not to mention the fact that you couldn't even close it because you couldn't see the 'X' button of the window(except Alt+F4). Even after i tried to make those windows smaller to fit in the new screen i had the problem of the panels inside those windows. Some of the java panels i had build inside those windows were to big for that screen or better to say they were placed so that even if i made the big application window smaller by draging the sides with the mouse during running no panel would become smaller. All the elements were like static in their positions.
    the Questions:
    1) Is that the grouplayout is suposed to do? And if yes than why to use such a layout? Why is it there?
    2) What layout should i use in the future not to have this problem again?
    p.s: an example of what i want is any internet browser. While trying to write on this textarea if i maximize the window the element will be i think rebuild to fit in the new size. This textarea will become bigger and also the other way around if i try to make this window smaller this textarea will become smaller. This is something that my application does not do and i think that is the fault of the grouplayout.
    thanx a lot
    anteo

    GroupLayout was designed to be used by IDE's, not human beings.
    What layout should i use in the future not to have this problem again?You don't use a single layout. That is a limitation of using an IDE.
    Generally people start with a BorderLayout. Then you add a toolbar to the North and and a status bar to the south. That leaves the Center for you main application. You would use whatever layout manager or combination of layout manager you require to get the desired effect.
    So start by reading the Swing tutorial on "How to Use Layout Managers" to become familiar with them and then experiment.

  • Mobile layout shows as desktop on phone

    I created a mobile layout about a year ago that always appeared as it was designed. Recently I was informed by my client that the desktop version shows on the phone. I checked the layout on a simulator and it looked like the designed mobile layout. Why would the phone not be accessing the mobile layout?
    I have tried placing the layout on the master, making little changes and republishing, but I still get the destop layout on my phone.
    Suggestions?

    I logged on from my phone on 7/23/2013 and now it renders correctly!

  • MinHeight/MinWidth is ignored

    After setting the MinHeight value of a AnchorPane with SceneBuilder (writes correctly to fxml file) the window is still resizable into a size with a smaller height.
    From Java this.rootPane.getMinHeight() does return the right value.
    Example FXML:
    <minHeight>
    <Long fx:value="400" />
    </minHeight>
    Using JavaFX 2.2 (JDK7u7)

    I didn't get why there are these "minimum" properties? Where do they occur?The minHeight/minWidth properties on Region are enforced in Layout Panes.
    http://docs.oracle.com/javafx/2/api/javafx/scene/layout/Region.html#minHeightProperty
    For the root pane root pane it can seem that the minimum size properties have no effect because the root scene will be clipped to the available area as the stage is sized small so, in effect part of the control does not lie within the visible window (unless you also set a minimum size for the stage as Daniel mentions).
    To see suggestions on how the property may be used, search for minHeight in the following tips document:
    http://docs.oracle.com/javafx/2/layout/size_align.htm
    Usually you use the properties to enforce a minimum or maximum size of resizable nodes placed in a layout manger that are being laid out relative to each other. You can think of the preferred size as the default size of a node and the node can stretch in size like a rubber band between it's minimum and maximum sizes. Note that there are a few tricks in the layout managers where you can set static constraints for sizing using things like HBox.setHGrow(node, Priority.NEVER). Additionally, some things like buttons by default have there max sizes clamped to their preferred size.

  • Strange JTable/JViewport resizing

    Folk'ses,
    i have a strange problem with a JTable and its viewport when i change the data and column model.
    * autoResizeMode is set to AUTO_RESIZE_ALL_COLUMNS.
    * all my columns have a minimum size
    * when i change my data and column model i do not get a scrollbar in the surrounding scrollpane
    in the 1.5 JTable.doLayout() doc i found the following note:
    Note: When a JTable makes adjustments to the widths of the columns it respects their minimum and maximum values absolutely. It is therefore possible that, even after this method is called, the total width of the columns is still not equal to the width of the table. When this happens the JTable does not put itself in AUTO_RESIZE_OFF mode to bring up a scroll bar, or break other commitments of its current auto-resize mode -- instead it allows its bounds to be set larger (or smaller) than the total of the column minimum or maximum, meaning, either that there will not be enough room to display all of the columns, or that the columns will not fill the JTable's bounds. These respectively, result in the clipping of some columns or an area being painted in the JTable's background color during painting.
    has anybody an idea how to get around this problem?
    is it so uncommon?
    why did they implement it like that?
    frustrated,
    thomas

    frustrated,Yes, a verbal description of the problem doesn't always help me. I have no idea what you code is like, what layout manger you are using etc.....
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

Maybe you are looking for

  • My "fix" to print problems in LR (using MS XP)

    Having had the same problems printing from LR as many others are complaining about, I thought that I might give my 2 cents to what I did to solve (?) the problem. I have to run with current setting in a while to be convinced that it is not just an in

  • Entries in table CDHDR for transaction MM02 missing after upgrade to ECC6.0

    Hi, I am supporting a client who has just performed an upgrade from 4.7 to ECC6.0 on their test system.  We try and use transaction MM04 (display material master changes) or MM02 and view changes to the material master but there are no entries. Durin

  • Printing issues in production

    Hello, I We are having some printing issues with the term contract (ME21N) in production although everything is working fine in all other systems. I created a new term contract in production and when saved it stayed in my spool and failed to print im

  • Delete page problem in Acrobat X

    When I first open a document I have to execute the Delete Page command twice for it to take effect. After that it works the first time in that document. But if I open another document, I have to hit the command twice the first time in that doc as wel

  • Connecting to an oracle database questions

    <p>Our current solution to connecting to our oracle database uses the following code:</p><p>    ReportClientDocument clientDoc = new ReportClientDocument;</p><p>    java.sql.ResultSet rs =  fetchResultSet(driverName, connectStr, userName, password, <