preferredsize Questions

4

Solved

I am trying to match the JTable column width depending on the data inside. My Code: for(int column = 0; column < gui.testsuiteInfoTable.getColumnCount(); column ++){ int width =0; for (int ...
Entitle asked 25/7, 2013 at 12:33

2

Solved

This question is about different behaviour of JEditorPane in Java 8 and Java 9. I’d like to know if others have experienced the same, whether it could be a bug in Java 9, and if possible have your ...
Arrow asked 14/3, 2018 at 8:44

4

Autolayout will randomly clip the text in my UITextView. It changes the size of the UITextContainerView when you rotate back and forth from landscape to portrait. It will work correctly several ti...
Lewan asked 25/1, 2016 at 0:16

5

Solved

i have created a JFrame in netbeans. But when i run the program, the Jframe size is too small. here is my code. import javax.swing.JFrame; public class Window { private static void demo() { ...
Sensate asked 27/10, 2012 at 12:16

6

Solved

Title explains the question. How can I easily do that?
Strickman asked 27/7, 2012 at 11:6

3

I'm trying to place a component on the corner of the window. However, my window has a scrollbar and the scrollbar is placed on top of the component. So I'm trying to change the position of the co...
Laliberte asked 8/10, 2013 at 19:31

2

Solved

I want to stack some JComponents vertically inside a JPanel so they stack at the top and any extra space is at the bottom. I'm using a BoxLayout. The components will each contain a JTextArea that s...
Mccombs asked 23/12, 2012 at 12:14

1

I am trying to change the preferred content size of a UIPopOverController from inside the childViewController. Firstly I present PopOverViewController this way DateViewController *dateView = [[D...
Homologue asked 23/1, 2015 at 14:58

2

Solved

I have searched all problems like this but I couldn't find the solution. public class FormPanel extends JPanel { private JLabel namelabel; private JLabel occlabel; private JTextField nametext; ...
Reg asked 15/12, 2014 at 2:30

5

I need to assign a fixed width to a few columns of a JTable and then an equal width to all the other columns. Suppose a JTable has 5 columns. The first column should have a width of 100 and the se...
Espousal asked 25/9, 2013 at 18:40

1

Solved

I've read Oracle's API hundreds of times, read countless articles, both here and elsewhere, and i still cannot resize columns after the jtable becomes visible. As you can deduce, i'm also trying to...
Globetrotter asked 21/9, 2014 at 0:57

3

I want to start building my own customized JComponent's for a project at work. I have a simple example below that should just create a ball on the screen. (I found most of it on the internet) but i...
Incestuous asked 5/5, 2014 at 18:54

2

Solved

I tried setPrefferedSize and setSize methods, but the dialog still opens at minimum size. private void method() { commandDialog.setPreferredSize(new Dimension(100,100)); - - - - - - //Componen...
Sorilda asked 29/11, 2013 at 20:53

2

Solved

I am writing a code for basic GUI. There i need a Text Area. But i can not make the Text Area in my desirable size. i use setPreferredSize method to set the dimension of the Text Area. But it did n...
Brunell asked 12/9, 2013 at 14:42

3

Solved

I have been trying to tame JDesktopPane to work nicely with a resizable GUI & a scroll pane, but am having some troubles doing so. It seems that unless the drag mode is outline, the desktop pan...
Trant asked 30/8, 2013 at 12:29

1

Solved

It's Monday morning where I am, which means it's time for me to fail at Java Swing! But in all seriousness, I cannot figure out why my dynamically created JTable refuses to show itself once added t...
Dagley asked 22/4, 2013 at 13:10

2

Solved

I created a simple menu in Java, but I can't figure out how to change the size of a button. My menu looks like this: I want the last button to have same size like other buttons. tlacTisk.setSiz...
Taipan asked 28/3, 2013 at 16:12

1

Solved

I need to create a JTable inside JScrollPane with resizeable columns (when user increase column width - horizontal scrollbar appears). For this I have use table.setAutoResizeMode(JTable.AUTO_RESIZE...
Monserratemonsieur asked 5/3, 2013 at 21:41

1

Solved

I am new in Java, and I just found this piece of code in StackOverflow: ResizeTextArea. I want to use JTextPane instead of JTextArea. In JTextPane, there is no setRows() method to change the numbe...
Esbjerg asked 23/2, 2013 at 10:48

2

I am creating an window with a JToolBar containing two buttons. One is a regular JButton and the other is a BasicArrowButton (javax.swing.plaf.basic.BasicArrowButton). Without doing any additional ...
Gesticulation asked 21/1, 2013 at 20:27

1

Solved

I have a JList inside a JScrollPane that's placed in a JPanel (BorderLayout.CENTER) and putting that inside another JPanel's BorderLayout.EAST (this JPanel's CENTER contains another JPanel) and thi...
Leviticus asked 28/11, 2012 at 8:45

1

Solved

I intended to make a JFrame with a ContentPanel of 600x600 and I wanted the JFrame to be not re-sizable. Inside this box, I Drew a 600x600 red-outlined rectangle to make sure that everything matche...
Vigilance asked 22/11, 2012 at 6:25

4

I want the table with the same width as the frame and also when I resize the frame the table need to be resized too. I think setSize() of JTable doesn't work correctly. Can you help me? import ja...
Intercellular asked 3/11, 2012 at 21:24
1

© 2022 - 2024 — McMap. All rights reserved.