Questions tagged [grouplayout]

GroupLayout is a Java Swing LayoutManager that hierarchically groups components in order to position them in a Container.

GroupLayout is a LayoutManager that hierarchically groups components in order to position them in a Container. GroupLayout is intended for use by builders, but may be hand-coded as well. Grouping is done by instances of the Group class. GroupLayout supports two types of groups. A sequential group positions its child elements sequentially, one after another. A parallel group aligns its child elements in one of four ways.

Relevant documentation and tutorials:

180 questions
0
votes
1 answer

IllegalStateException in a GroupLayout

I use a GroupLayout for my panel : GroupLayout layout = new GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup() .addComponent(title_panel) .addComponent(subtitle_panel) …
Sara
  • 469
  • 2
  • 8
  • 24
0
votes
0 answers

Java set component location in GroupLayout

I'm trying to make a marquee like effect in my program, the text is determined by the content of a file which will result a dynamic lenght/width for JLabel, and the problems are: I use drag n drop and GroupLayout since it will auto resize the…
A-SM
  • 882
  • 2
  • 6
  • 18
0
votes
0 answers

Exception in thread for group layout

EDIT: Moving the temp panel out of my constructor solved the initialization issue, regardless trying to add anything to the group still throws exceptions. I have a button in a tab of a tabbed jframe that sets the default text and buttons of the…
0
votes
1 answer

Problems while making a GUI with NetBeans: GroupLayout can only be used with one Container at a time?

I'm making a GUI with Netbeans in JAVA. My idea is something like this: JFrame -> contains a JPanel -> call a JDialog. -> call a second JDialog The idea is that I want to read something in the first JDialog, and when…
joanlopez
  • 579
  • 1
  • 6
  • 17
0
votes
1 answer

Java GroupLayout Exception

public class Grouplayout implements Runnable { public static void main(String[] args) { SwingUtilities.invokeLater(new Grouplayout()); } @Override public void run() { JFrame jFrame = new JFrame(); GroupLayout layout = new…
user1552545
  • 1,233
  • 3
  • 15
  • 33
0
votes
0 answers

Not able to resize JPanel dynamically

I am using GroupLayout and I have a MainPanel. In that, I have a header, a footer, 2 other JPanels and a button. I want to hide/show panel1 whenever I click that button. I am using setVisibility() function on panel1 to do that. Everything is…
0
votes
1 answer

Add an External Frame in a JDesktopPane Java

I have a Frame called " Menu_Project". I have another Frame called "Main_Menu" where it has a JButton and upon clicking on the Button, I want to call the frame " Menu_Project" inside the JDesktopPane. I tried a to follow a tutorial on YouTube at…
Ms_Joe
  • 160
  • 2
  • 7
  • 16
0
votes
1 answer

Cannot add JScrollPane to JTextArea in GroupLayout

Here is the code for what I tried but the scroll pane is not showing up and am using Group-layout. import java.awt.BorderLayout; public class JScrollPanel extends JFrame { private JPanel contentPane; /** * Launch the application. */ public…
0
votes
2 answers

Java layout debug error

I have created a GUI and copied the generate code carefully modifying what ever is necessary to over to a class and added all the necessary imports and such, but when I build the project it gives me this error which I am not able to figure…
0
votes
1 answer

Unable to vertically align JLabel with JCheckBox as if single JCheckBox with GroupLayout

Sometimes I need the label for a checkbox to be to the left of the checkbox not the right so instead of using JCheckBox checkbox = new JCheckBox("label",false); I do: JCheckBox checkbox = new JCheckBox("",false); JLabel label = new…
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
0
votes
2 answers

GroupLayout.linkSize() on two JTextEdit's makes them zero size

I'm writing a Java program (minimum compilable example below), and I'm trying to pretty up the user interface by making some elements line up. If you run this, you can see that d_ip and d_pword would look a lot better if I could make them the same…
Timothy Miller
  • 1,527
  • 4
  • 28
  • 48
0
votes
1 answer

Regarding Group Layout

hi I have tried to implement group layout fro my assignment requirement below is my code snippet but I am having one problem within this code snippet when i do pack(); it throws me exception also I don't know how to make it visible please guide me…
Hardy
  • 33
  • 1
  • 1
  • 6
-1
votes
1 answer

Java resize layout by resizing element

I have a problem. I have JFrame element. Inside this frame element there's PaintingPanel (extends swing JPanel class) with layout set to FlowLayout(FlowLayout.LEFT) and fixed width and height. Inside PaintingPanel there's CanvasPanel element…
Przemek Kro
  • 321
  • 1
  • 2
  • 7
-1
votes
1 answer

Java Swing Login Form

I'm trying to create a login form using Java Swing. But I want the layout to look tighter, but still responsive. The structure of my project Project/ └── src ├── GUI │   ├── Control.java │   ├── Main.java │   └── pages │   …
timthedev07
  • 454
  • 1
  • 6
  • 17
-1
votes
1 answer

Wanna use scrollable JTextArea ,but it does not work

Try to create testarea with scrollable .I use ScrollPane on JTextArea bit does not work I do google lots but cannot solve my problem ,I saw some solution such as this link ,but cannot solve my problem also Here is my code JTextArea txtrZdsxasd =…
user2968192
  • 21
  • 1
  • 5
1 2 3
11
12