layout-manager
The JPanel contentpane confusion
I am learning Java Swing and I appended a menuBar to the frame. By default this should call jframe.getContentPane().add(child). When I ran the script the menuBar didn\'t show up. But the button was at[详细]
2023-04-13 08:59 分类:问答Getting java to display more than 1 .add()
I\'ve started learning basic Java and wanted to rewrite a Game Map Generator that I\'ve once wrote in PHP. I\'ve got part of it working fine (This is just the start), but whenever I want to display 2[详细]
2023-04-13 06:23 分类:问答JScrollPane inside BorderLayout.CENTER doesn't resize
This is the code below, the problem is that the JScrollPane stays at its preferred size and doesn\'t resize with the BorderLayout.CENTER region. I want it to fill that region, of course.. and use it t[详细]
2023-04-12 20:18 分类:问答Why this code's JTextArea occupies entire JFrame?
I expect part of my frame contains the JTextArea but it occupies entirely. I cannot trace the error here.[详细]
2023-04-12 11:43 分类:问答How to make a swing component's bounds fixed
I have a JPanel to which I have added a few components (checkbox, combo etc.). I have noticed that, when the frame is maximized, the bounds of components also move or shift to the right. Then, on rest[详细]
2023-04-11 18:16 分类:问答How can I enable the handle on layout manager?
Given the following javascript code : var layoutFull = new YAHOO.widget.Layout({ units: [ { position: \'left\',[详细]
2023-04-11 02:24 分类:问答Added JButton control to JApplet and the JButton fills the whole screen
I am new to Java Applet programming and Java in general but I am very good in C# and C++. Anyway I am making a simple calculator with a JTextField, JButton and JLabel. But the JButton and JTextField t[详细]
2023-04-10 18:42 分类:问答Layout with fixed height and variable width JButtons
I look for a LayoutManager that has fixed height JButtons that expand in width to fit the size of their Container. Above the JButtons there should be a JLabel by itself on the line that says \"Choose[详细]
2023-04-07 00:52 分类:问答Read JFrame size from JPanel
I have a Layout class which extends JFrame. Later I am adding RoadPanel which extends JPanel. At run-time is it possible to know Layout frame size in RoadPanel?[详细]
2023-04-06 07:16 分类:问答How to overlay, resize and centre a component on a JPanel?
I\'ve spent a while reading and experimenting here, and come up with a few approaches, but not got any of them to work completely yet, so I would like to know what more experienced Swing programmers w[详细]
2023-04-01 04:56 分类:问答