Questions tagged [null-layout-manager]

236 questions
1
vote
1 answer

Error with java text areas

My JText Area is not working. You will see if you run this code. The textArea keeps going to different places even though I have set a definitive spot that it should be. The code for the textArea is line 57. What I exactly need is for the testArea…
1
vote
2 answers

Center panel when window resized

I would like to keep a panel I have created using an absolute layout in the center of my window even when the window is resized (if possible). I've come across a couple of suggestions here and [here][2] but no dice! Below is my sample code, any…
1
vote
2 answers

how to keep JLabel over JProgressbar

This is a part of my java code, in this code I want that the progress bar should always remains under the label (at the back of label), progress bar is under the label when I start the program, but progress bar comes over/upon the label when I click…
1
vote
2 answers

Jtextfield begins in a smaller state

I am making an example application just to learn basics. I am having a problem where I have 3 JTextFields and when I launch the application the bottom 2 JTextFields do not show up, but the first one which has the focus, does. But only a fraction of…
erp
  • 2,950
  • 9
  • 45
  • 90
1
vote
1 answer

Cant see JComboBox or JCheckBox

I want to make an Java-Aplication with Swing Forms. But I have a Problem. I can see all Textboxes, all Buttons an Labels. But there's no way to see the JComboBox. Same with JCheckBox. Where is the Problem? import javax.swing.*; import…
sagschni
  • 89
  • 1
  • 13
1
vote
1 answer

Positioning JButton on JFrame won't show up

I know this is horrible coding but I desperately need to fix this problem. I've tried multiple ways of trying to position the button but the button still stays in the top center with all the other buttons lined up after it. import…
1
vote
0 answers

JButton .WIDTH not giving a value?

I am extending the JButton function so as to automate a couple of things, so I have only added this function: public void addButton(Container container, int left, int top, int width, int height) { this.setBounds(left, top, width, height); …
user3079666
  • 1,159
  • 10
  • 23
1
vote
1 answer

JFrame Layout set to null issues

I am trying to learn GUI from a book I just got, but I am having tons of problems (my code is attached). When I launch this app, All I get is a minimum window that need to expand every time, and the only thing it shows is one of my radio buttons. I…
1
vote
2 answers

Invisible JButton in JPanel

Here's my JPanel. The first button is always visible, but the secound is visible only when you place a cursour on it. Where the problem can be? P.S. Please use simple english, if u can, because I don't speak english well public class GamePanel…
dddkk
  • 85
  • 1
  • 9
1
vote
6 answers

JPanel not showing when added to JFrame

I am creating a GUI in java. Currently i have an empty JFrame and am trying to add a JPanel to it. The JPanel contains buttons, text etc. However none of this is being displayed. My code is as follows: import java.awt.*; import…
user3120023
  • 197
  • 3
  • 6
  • 16
1
vote
1 answer

how to set the autosize of jtextarea change by the length of words

In my app, the layout of panel is null because of I need to insert image and text in position where i choose. I hope the width and height of text can auto change with the length of words. If it does't work,another way will be OK. Click the panel to…
1
vote
1 answer

Adding JScrollPane to a JPanel without a Layout Manager

Before I start, I'm aware that its a bad idea to not use a Layout Manager and usually I do use one, however, I also have all my components automatically re-size and relocate based on the size of the window. In addition the program I'm working on is…
Cody
  • 870
  • 4
  • 21
  • 38
1
vote
1 answer

Take JTextArea and add entered contents to a label

Basically I have a program with cards(I'm using the CardLayout), when the user types a sentance or what ever they type I would like that to be added to a label on the following page when they hit a button named create. I'm not sure how i would get…
user3255328
1
vote
4 answers

What's wrong with the Null Layout in Java?

Bonjour. Upon spending countless hours around this site looking for code to drag a component around the screen, I noticed an odd trend growing in the answers. ...being that everyone shudders at the sound of the null layout. So I ask, what's the…
MMJZ
  • 163
  • 11
1
vote
2 answers

setLocation of Label

I have all of the labels working correctly but the userLabel[3] is not positioning properly No matter what I do, the label "Color:" always shows up on the frame with a x-coordinate of 0 and a y-coordinate that is half way down the frame. …
JavaNewb
  • 87
  • 6