Questions tagged [null-layout-manager]

236 questions
0
votes
1 answer

JTextArea not show

I create an Team application in java. I add a logo which is the combination of Rectangle and Circle in JFrame but after add logo in application JTextArea not shown... Also adding new player not shown... Here is my code. import…
Ahmar
  • 3,717
  • 2
  • 24
  • 42
0
votes
2 answers

Button placement and location not working

I recently tried out an online tutorial of Swing and Java GUI's and I decided to replicate the tutorial code but add in a third button. I tried to add in a red one, and I successfully did (it doesn't do anything yet), but i'm having some coordinate…
Xiam
  • 345
  • 4
  • 8
  • 16
0
votes
1 answer

Switching from null layout to GridBagLayout in Java

Below is the runnable code for a calendar application. This application wasn't written by me, and it uses a null layout. I need much more flexibility for my purposes, so I'm trying to use a layout manager instead. However, nothing except the panel…
0
votes
2 answers

How to add jScrollPane to Null Layout of jPanel

How to add jScrollPane to Null Layout of jPanel in netbeans ? i am using Null Layout for jPanel and i searched out on different sources but still I am failing to add jScrollPane to Null Layout of jPanel. Please help with source code if…
Ayaz Ali
  • 311
  • 2
  • 7
  • 16
0
votes
0 answers

How to get value of component that data is being transferred to?

I am using a transfer handler to transfer text from one jlabel (A) to another when you drag one jlabel(B) onto another. I got the text to change on B to that of A, but is there a way to identify what the text of B is before you drop the text on…
rasen58
  • 4,672
  • 8
  • 39
  • 74
0
votes
0 answers

change layout of jframe form designed in netbeans

I have designed a JFrame using netbeans IDE using absolute layout but when i run my application on other windows systems, the layout changes. Is there a way to provide a consistent layout across different systems?
adesh
  • 1,157
  • 3
  • 18
  • 28
0
votes
2 answers

Widgets behaving strangely when using "setlayout(null)"

I'm doing the following call in my code: ... setLayout(null); ... I'm trying to place a button and a textfield by specifying their x and y coordinates. The problem when I run the program (either with Eclipse or BlueJ) is that I need to run on the…
מןהזס
  • 17
  • 1
  • 1
  • 2
-1
votes
2 answers

Java swing components layout position changes after restoring a minimized window

I'm developing a Flight Information Display(FIDs) Application that displays information with JLabels. I have different JPanels that contains different labels. My issue is that when I launch the window, it displays properly with each components…
-1
votes
1 answer

This is my first time using swing and I'm having issues with the JPanel

I am working on a program for my school to use. It is like match.com, but for a public school. Yes there has been permission from the school to do this. This is the first time I have ever used swing and I am having an issue with adding my JPanel to…
-1
votes
2 answers

JFrame & JPanel sizing issue

I am attempting to code a JFrame containing a JPanel. Within the JPanel is an array of JTextField's. So, my GUI looks like:- I am not using a layout manager, and have set this to null for the JFrame and the JPanel. I am sizing these components by…
-1
votes
1 answer

Remove Panel from layout only

I have a frame where the layout is null. There is a panel attached to it that has a flow layout. My code has it so that a button press creates a new panel that gets added to the first panel (the one attached to the frame). Then I have a mouse…
-1
votes
2 answers

JLabel not positioning correctly

I am just throwing together a quick and dirty GUI to display some data when I ran into an odd issue. The last label I add to the JFrame doesn't want to be positioned or display the border I put on it, so it looks like this: Here is my code: public…
-1
votes
1 answer

setLocation() and setBounds() method for JButton not working in specific cases

I found similar questions on this forum, but they are not exactly my problem. I have a JPanel with absolute layout and on that panel, I have two JButtons. One is called swapButton, which swaps position of two buttons on the same panel and another is…
-1
votes
1 answer

Putting JPanels on JFrame in specific areas

Sorry for not putting specific code in previous post. I realized I was doing something wrong, but now am having another problem. I am trying to place a JPanel at a specific place on a JFrame after clicking a button but nothing is happening, here is…
-1
votes
1 answer

Adding a JScrollPane removes all the components inside JPanel

When I add a JScrollPane to a JPanel, all the buttons inside the JPanel go away and it becomes empty. I was following this post here as well as other similar ones. Here is the code without the JScrollPane: JPanel panel = new JPanel(); …
Tejas Sharma
  • 89
  • 12