Questions tagged [null-layout-manager]

236 questions
0
votes
1 answer

Custom layout in frame

When i add another JPanel into frame previous will dissapper (or probably overlaps the previous one). How can i stop this overlapping? public Attack() { JFrame frame = new JFrame("Oracle Padding Attack"); …
0
votes
1 answer

JLabel force text to fit the JLabel bounds (null layout)

i'm working with layout set to null, i have a JFrame with an aspect ratio and during the resize, this frame keep the same aspect ratio. Every time i resize the frame i resize all my components without any problems just one with JLabel. When i resize…
Aaleks
  • 4,283
  • 5
  • 31
  • 39
0
votes
1 answer

JTextArea does not show up until you select it

My code creates a basic Sign Up screen, but the JTextArea objTE1 does not show up until you select where the text would be. import java.awt.*; import javax.swing.*; public class SignUpScreen extends Frame { SignUpScreen() { super("No…
0
votes
4 answers

JLabel image won't display on JFrame

I've created a Login form for a program using a JFrame. It will display all the text labels, input fields, buttons and other GUI elements but for some reason it will not display my image file (the image "mm.png" is stored in the project's parent…
mickm
  • 281
  • 2
  • 6
  • 20
0
votes
2 answers

Set a TextField's location in a java applet

I am trying to add an extra feature to a school project. When I add a TextField to the code it appears at the top in the middle. I want to be able to change the location of the TextField My code looks like: import java.applet.*; import…
0
votes
1 answer

How to Set Bounds of JTable while Set Layout is Null?

In my public UI(){ I have JTextField,JButtons and labels I have also setLayout(null); } Now I'm Trying to create a JTable JTable table = new JTable(data, headers); But it wont display until I take out setLayout For all the buttons,text boxes…
Shiv Chand
  • 43
  • 1
  • 6
0
votes
1 answer

Java Swing - Position measure unit?

I'm making a chess game, and I'm using a chessboard that I made with paint at 480x480, and got the pieces from some sprite and made each one of them 60x60 and transparent background. I managed to put the chessboard and the pieces on screen, but the…
WalrusNine
  • 103
  • 9
0
votes
1 answer

getLocation on dynamically created JButtons in java

OK so i dynamically made a line of J Buttons on a J Panel with a null layout using this code: int Y = 100; int X = 100; for(x=1, x<=20, x++){ button = new JButton(x); button.setLayout(null); button.setSize(100, 100); …
Shadowkillsa
  • 77
  • 1
  • 8
0
votes
2 answers

JScrollPane in Jlist

hello goodevening to all i have a problem on my program with the ScrollPane in my JList i cant put an JScrollPane in my list because i am using a panel instead of Container this is my code so far its all runnable the problem is if you enter a high…
Batusai
  • 149
  • 1
  • 1
  • 12
0
votes
1 answer

Flashing JTextField and JButton

//ADDING BET FIELDS setLayout(null); horseChoice = new JTextField(); horseChoice.setBounds(200, 585, 300, 20); add(horseChoice); setLayout(null); horseBet = new JTextField(); horseBet.setBounds(200, 625, 300, 20); add(horseBet); //ADDING BET…
user3254808
  • 33
  • 1
  • 7
0
votes
1 answer

ScrollPane in the JTextArea

This is part of GUI project I'm working with and I'm trying to make JScrollPane to appear in the JTextArea when the text is longer than the size of the JTextArea. It looks fine to me but the JScrollPane still doesn't show up. JTextArea textArea…
Mike
  • 380
  • 4
  • 19
0
votes
2 answers

Using null layout in Java Swing

I programmed a game in Java Swing using null layout. Except for a few glitches that I'm working on, it is perfectly functional and looks pretty nice. My plan: fix the few bugs, add a few extra features, then use SwingWeb or AjaxSwing to allow my…
Sid
  • 563
  • 1
  • 10
  • 28
0
votes
2 answers

Adding vertical spacing to NORTH component in BorderLayout

I have a JFrame with a BorderLayout. I added a JPanel to the NORTH side of the JFrame. In this panel I want to add components to it in an absolute positioning. In the Center side of the JFrame I added another JPanel which should take a huge space.…
Jack Twain
  • 6,273
  • 15
  • 67
  • 107
0
votes
1 answer

Java Window coordinates wrong

So i've got a java JFrame which i'm putting a canvas in, and its appearing at the wrong coordinates, as if its taking 0,0 as the bottom left corner, rather than top left. Here's my code. JFrame frame = new JFrame("Test"); …
DuskFall
  • 422
  • 2
  • 14
0
votes
2 answers

Running JTabbedPanel on for loop in java

Hi I tried to run JTabbedPanel using for loop.. My program is running successfully. But its not creating any Tab file as what i expected. please help me. public void GenerateGUI() { jPanel = new JPanel[3]; jSplitPane1 = new JSplitPane(); …
RAGHU
  • 3
  • 4