donniedarko801
asked on
NetBeans 5.5 / How to disable Auto Resize of components.
Hello Experts,
There is something that is really bugging me about Net Beans 5.5 and I was wondering if you could help. Every time I place a few components in a jFrame, the thing tries to help me by auto resizing stuff. I can not describe how much I HATE that. Can you please tell me if there's a way to stop that? No. I do not mind taking the extra time to align everything on my own.
There is something that is really bugging me about Net Beans 5.5 and I was wondering if you could help. Every time I place a few components in a jFrame, the thing tries to help me by auto resizing stuff. I can not describe how much I HATE that. Can you please tell me if there's a way to stop that? No. I do not mind taking the extra time to align everything on my own.
What is the default layout that the JFrame has? Change the layout to something else in which the resizing does not take place, e.g., FlowLayout.
ASKER
Where and how would I do that? Sorry, new to it :)
jpanel.setLayout ( new FlowLayout () ) ;
or jframe.setLayout ( new FlowLayout () ) ;
or jframe.setLayout ( new FlowLayout () ) ;
ASKER
Done. Now I can't even drag anything around... Sigh... Man... When it comes to IDE microsoft rulesby a couple light years...
It doesn't have anything to do with the IDE. Its a mistake somewhere else. What are you trying to drag and where?
>> When it comes to IDE microsoft rulesby a couple light years...
No :) read this in your free time:
https://www.experts-exchange.com/questions/22403032/Microsoft's-Visual-Studio-for-Java-development.html#18581438
>> When it comes to IDE microsoft rulesby a couple light years...
No :) read this in your free time:
https://www.experts-exchange.com/questions/22403032/Microsoft's-Visual-Studio-for-Java-development.html#18581438
ASKER
Is not a mistake. The IDE was desing to be smart. They made it too smart and now it gets in the way.
No, it depends on which layout you are using.
>> What are you trying to drag and where?
>> What are you trying to drag and where?
ASKER
I'm using a JFrame with swing components. I want it to look like windows programs or to be able to move one component without NetBeans try to resize the others accordingly.
Set your JFrame's layout to a null layout. yourFrame.setLayout ( null ) ;
ASKER
I don't want the following to happen:
"By default, new forms created with the GUI Builder use a FreeDesign paradigm which enables you to lay out your form using visual guidelines that automatically suggest optimal alignment and spacing of components. As you work, the GUI Builder translates your design decisions into a functional UI without requiring you to specify a layout manager. Because FreeDesign employs a dynamic layout model, whenever you resize the form or switch locales the GUI adjusts to accommodate your changes without changing the relationships between components."
"By default, new forms created with the GUI Builder use a FreeDesign paradigm which enables you to lay out your form using visual guidelines that automatically suggest optimal alignment and spacing of components. As you work, the GUI Builder translates your design decisions into a functional UI without requiring you to specify a layout manager. Because FreeDesign employs a dynamic layout model, whenever you resize the form or switch locales the GUI adjusts to accommodate your changes without changing the relationships between components."
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks, you helped me a lot.
is there any radical solution for this ??