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

How to create image slider in swing using grouplayout?

Hi i am trying to create to create desktop application in using i am using Group Layout for creating mu Gui i tried to create image slider but i am not able to achieve how can i achieve this when i run my progrram it throws exception …
user3377703
0
votes
1 answer

continer cannot contain non null values for an array of panels

I am creating a Java app project that something similar to the one I post below Has a single frame with a label. A Mastercardpanel just below the label. An array of panels to be embedded onto the Mastercardpanel Code snippet CardLayout card=new…
Creative_Cimmons
  • 255
  • 1
  • 2
  • 11
0
votes
0 answers

How do I make this tile-based GUI with GroupLayout (or any other layout!)

I am trying to achieve the following sort of tile-based setup : This is what my code is currently producing : Below is my current code snippet that is generating this. For clarification, I have tried to combine the northCentralArea and…
Billy M.
  • 369
  • 2
  • 16
0
votes
1 answer

Java Swing - Dynamic JPanel GroupLayout Resizing Issue

These images show a chat box that needs to be resized with the application frame. I'm using GroupLayout to do so. The hierarchy of the frame goes something like this chatDiv(JPanel, GroupLayout)->chatTabbedPane(JTabbedPane,…
gagan1411
  • 25
  • 3
0
votes
2 answers

Checkboxes out of row in Grouplayout

Like you see in the picture the checkboxes are out of the rows. How I can get them in the rows where the Labels and Comboboxes are in? The Checkboxes activate the ability to search the value in the database. In the code the checkboxes are named…
Chris
  • 128
  • 4
0
votes
0 answers

I'm trying to correct the layout of Aqua buttons in GroupLayout, but is it even possible?

I noticed if you try to use LEADING alignment in GroupLayout when one of the components is a button and the other is not a button, the components no longer line up. If both components are buttons, you get results like this: getContainerGap(button,…
Hakanai
  • 12,010
  • 10
  • 62
  • 132
0
votes
2 answers

GroupLayout and component size span

I'm creting a Java app using SWING for the UI. My choise for the LayoutManager goes to a GroupLayout, but now I got a problem with a Component. The basic layout is made by three columns and two rows (there are nested rows, as you can see in the…
basteez
  • 477
  • 1
  • 5
  • 15
0
votes
1 answer

What's the best way to keep JButtons centered in a JPanel using GroupLayout on JPanel resize

I originally spent quite a bit of time trying to get the JPanel to re-size when the dialog gets re-sized by grabbing the bottom right corner with the mouse and dragging. I cracked that, I think, but now cannot get the buttons to stay centered. I've…
Godaigo
  • 3
  • 2
0
votes
1 answer

Layout manager won't work

I have done an layout in my GUI but it did not work , all the component just appear one after another. Here is my codes : import javax.swing.*; public class main extends JFrame { public main() { try { add(new FYP_Tx.GUI()); …
HH.
  • 769
  • 2
  • 10
  • 21
0
votes
2 answers

How to use more than one JPanel with Grouplayout

Im trying to add multiple JPanels to my Frame and have them each use a GroupLayout but for some reason I either get NullPointerException or Exception in Thread main. What might I be doing wrong and how might I go about fixing it? Would I then do…
0
votes
0 answers

java - is not attached to a horizontal group

I'm trying to create a JPanel with a grouplayout, only it still gives the same error. It's not attached to a horizontal group. When I run the program sometimes it's the okButton, then it's the openButton and the next time it's one of the…
Lutske
  • 117
  • 3
  • 17
0
votes
1 answer

Error (NoClassDefFoundError) loading applet

I am using Netbeans 7.3, JRE 1.7.0_11, Java SE 7 update 40, on Mac 10.8.5. I have created a JApplet GUI form which I have embedded in a applet tag within a HTML doc, which I have created in a Java Wed application. When I try to run in Safari I get…
dancingbush
  • 2,131
  • 5
  • 30
  • 66
0
votes
1 answer

Aligment of Jlabel dynamically created

I'm trying to create jlabels and jtextfields dynamically and add then to a jPanel where the user can insert data into a table in a database. I retrieve from the database the name of all the table attributes and then I have to create a jlabel and a…
candiani
  • 29
  • 7
0
votes
0 answers

Jpanel size automatically changes

I am using a Jpanel an adding JLabels that contains Icons to it. I am using GroupLayout. My problem is that when I try to add the seventh component the Jpanel changes its size by itself although there is still enough space for it to add other…
Mes M
  • 17
  • 2
0
votes
1 answer

Swing layouts dependency on container

Why does a GroupLayout require a Container as an argument to the constructor, while a BorderLayout does not? I am not sure what information the Container object adds and why BorderLayout doesn't need that information.
Moeb
  • 10,527
  • 31
  • 84
  • 110
1 2 3
11
12