Top "Preferredsize" questions

Set size of JTable in JScrollPane and in JPanel with the size of the JFrame

I want the table with the same width as the frame and also when I resize the frame the table …

java swing jtable jscrollpane preferredsize
How to set size of JButton?

i am trying to set size of JButton, but by default it take whole frame, it's height easily set but …

java swing jbutton layout-manager preferredsize
Automatically adjust Jtable Column to fit content

I am trying to match the JTable column width depending on the data inside. My Code: for(int column = 0; column &…

java swing jtable preferredsize tablecolumn
How to change JTable header height?

Title explains the question. How can I easily do that?

java swing jtable jtableheader preferredsize
BorderLayout setSize issue

Before you come with GridBagLayout suggestions, I've tried that but I couldn't get it to work. I want a frame …

java swing netbeans layout-manager preferredsize
Button size (Java)

I created a simple menu in Java, but I can't figure out how to change the size of a button. …

java swing jbutton layout-manager preferredsize
Size of Text Area in java

I am writing a code for basic GUI. There i need a Text Area. But i can not make the …

java swing jtextarea jcomponent preferredsize
Set size of jpanel on a JFrame explicitly

I have JPanel with a border, the problem is that when I add the panel on the JFrame it takes …

java swing jpanel layout-manager preferredsize
Swing: set a fixed window size for JDialog

I tried setPrefferedSize and setSize methods, but the dialog still opens at minimum size. private void method() { commandDialog.setPreferredSize(new …

java swing layout jdialog preferredsize
Set Column Width of JTable by Percentage

I need to assign a fixed width to a few columns of a JTable and then an equal width to …

java swing percentage jtableheader preferredsize