Hi, I am trying to make a desktop application in netbeans. The GUI form that i have made, is longer than the size of the desktop screen, so the contents in the lower parts are not visible. Please help me to get ride of this problem.Here I'm pasting the picture.
Either you can adjust your components to fit in size or you can use scroll pane as base component and put all components on it so there will be a scroll bar
The solution described by org.life.java says it all. I am just elaborating that solution and adding one more option to try:
There could be three ways to achieve a usable window in this case:
- Design the form components in a JPanel instead of JFrame. Then add the newly designed JPanel in a new JFrame inside a JScrollPane
- Use the space available on the right side of the window to arrange the controls and reduce the height of the JFrame
- Use JTabbedPane to keep the components in separate tabs like General, Address, Contacts and shift the corresponding components in tabs
- In option 2 and 3 the Submit button shall be kept on the JFrame in the bottom area so it remains visible all the time.
with regards
Tushar Joshi, Nagpur
UPDATE:
After implementing the first point in my suggestions I created a JPanel through NetBeans IDE and named it ComponentsPanel. Then I created a JFrame and added one JScrollPane and JButton to that frame. I also added ComponentsPanel earlier created with all the text fields into the JScrollPane. The result looks like as follows:
After scrolling the scroll pane the window will look like as below: