Questions tagged [springlayout]

SpringLayout is a flexible LayoutManager in the Java Programming Language. It lets you specify precise relationships between the edges of components under its control.

SpringLayout is a flexible LayoutManager designed for use by GUI builders. It lets you specify precise relationships between the edges of components under its control. For example, you might define that the left edge of one component is a certain distance (which can be dynamically calculated) from the right edge of a second component. SpringLayout lays out the children of its associated container according to a set of constraints.

Relevant Tutorials:

62 questions
0
votes
2 answers

Best Layout Manager For Accomplishing This Task

I have (2) JTextAreas (input text & output text) (2) JComboBoxes ( AutoDetect & TranslateTo) Please see photo attached to see what the objective is. I am trying to obtain this layout with a certain layout manager I have tried FlowLayout,…
TravJav92
  • 117
  • 1
  • 2
  • 10
0
votes
0 answers

Layout is scaling my JList's

I am using the DualListBox.java example but the issue I have is that the width of the JList scales based on the length of the entry. Ideally I want the left JList to take up 40% of the width, the JButtons to take up 10% and the right JList to take…
codeCompiler77
  • 508
  • 7
  • 22
0
votes
1 answer

Can you put SpringLayout "esque" constraints on a CardLayout?

I have a card layout that can switch between Panels with a JComboBox. The problem is when i re-size the window my panel inside never changes size. When ever I would use SpringLayout I could just tell something to stay x pixels away from the border…
0
votes
1 answer

Java - Constraining Components below JScrollPanes with runtime change

I have a JFrame with a JScrollPane containing a JTable. Below the JTable I have placed a JButton with the SpringLayout: l.putConstraint(SpringLayout.NORTH, but, 50, SpringLayout.SOUTH, sP); The JButton adds a row to the JTable and updates the…
Nik-Sch
  • 102
  • 3
  • 6
0
votes
1 answer

SpringLayout not correctly spacing

I am using Spring Layout to design a gui for an application I am building. I am having an issue with spring layout; the components do not have correct spacing between then, specifically the message box and the send button as seen in the…
cliff
  • 49
  • 3
0
votes
1 answer

JTable does not show up

I'm a Java beginner and I'm using Eclipse to create an simple app with a SpringLayout and a button inside. I call that button 'btnTABLE' and here is its actionPerformed code: btnTABLE.addActionListener(new ActionListener() { public void…
Nhan
  • 456
  • 3
  • 12
0
votes
1 answer

Additional forces to networkx spring_layout

I would like to add additional forces to networkx spring_layout. I have a directected graph and I would like nodes to move to different sides according to the edges that they have. Nodes that have more outgoing edges should drift to nodes that have…
Aidis
  • 1,272
  • 4
  • 14
  • 31
0
votes
1 answer

SpringLayout not working on Java 5 (mac) VERTICAL_CENTER

The documentation of SpringLayout says that it´s available since java 1.4, I have like 7 old macs that can´t be upgraded to any newer version of mac os 10.5 which leads me to have only java 1.5.0_30 at most. The problem is that I have an app that…
0
votes
1 answer

JFrame not centering properly

Here is my code: import java.awt.Component; import java.awt.Container; import javax.swing.*; public class GUIBuilder { /** * Create the GUI and show it. For thread safety, this method should be * invoked from the event-dispatching thread. …
Pink Jazz
  • 784
  • 4
  • 13
  • 34
0
votes
1 answer

Use Spring layout For Hand GUI

I have a jframe that has a lable and two radiobuttons. I use spring layout, But my second radioButton seen in top left of page! public class tester extends JFrame { public tester() { add(create()); …
Sajad
  • 2,273
  • 11
  • 49
  • 92
0
votes
2 answers

How can I align my Jframe labels and buttons

I am trying to edit a piece of sample code that I found to create a form. The sample code included 4 labels and text fields aligned perfectly. I am trying to add in a button at the end but in stead the button is overlapping the labels in the top…
NeonMedusa
  • 95
  • 2
  • 6
  • 14
0
votes
3 answers

Why is my SpringLayout different from the example?

I am doing This example. My code is exactly the same but in stead of getting I am getting Can anyone explain why?
NeonMedusa
  • 95
  • 2
  • 6
  • 14
0
votes
1 answer

Java: Transposing a SpringLayout

I've got a SpringLayout that I need to transpose. Basically, when you create a SpringLayout it fills out the panel by columns, so that if you have JPanel temp = new JPanel() retCase2.add(label = new JLabel("A")); retCase2.add(label = new…
Keshava Murthy
  • 119
  • 1
  • 2
  • 12
0
votes
2 answers

How to right-justify a component within a SpringLayout?

I'm trying to create a layout that has a few text items at the left, and a button at the right. I've got the text items exactly the way I want them, but I can't get the button aligned at the right. I'm creating the button as follows: …
Edward Falk
  • 9,991
  • 11
  • 77
  • 112
0
votes
1 answer

Removing text field created with a SpringLayout

I'm using the code from the example on the official page of Oracle. The one for sorting and filtering table data. In the original variant it has two fields - one for entering a filtering criteria and second for showing which row from the grid is…
Leron
  • 9,546
  • 35
  • 156
  • 257