gridbaglayout Questions
4
Solved
I'm not exactly new to java (I've been using it for a year now) but this is my first go at swing. I'm trying to make a very simple chat client to learn both socket and swing at once. My question is...
Dalmatian asked 11/5, 2012 at 17:32
4
Solved
I'm generating some JComponents in code and using the GridBag layout to arrange them. My layout consists of 12 rows and 3 columns, with each row consisting of a JSlider, a JCheckBox and a JLabel. H...
Zavala asked 5/6, 2012 at 12:13
4
I am using Eclipse to build a program and when I go to run it, it says that "errors exist", I run it anyway, there are no errors showing up in the console and the application runs a blank screen. W...
Garrard asked 17/7, 2013 at 22:29
2
Solved
Inspired by this question
JLayeredPane with a LayoutManager
I'm trying to get the JLayeredPane to work with the GridBagLayout.
Here's the custom LayeredPane-class:
class StackConstraints {
public ...
Seasonseasonable asked 23/2, 2017 at 10:49
0
I have following code to add panels dynamically to container with GridBagLayout.
It should grow and display vertical scrollbar, not horizontal.
But when I add too long text in JLabel in parent JPa...
Flense asked 4/12, 2016 at 10:3
6
Solved
I'm new to Java Swing and I have been struggling to start the GridBagLayout from top left corner so that c.gridx=0 c.gridy=0 will put my object on the top left corner.
I'd appreciate if you could ...
Roxane asked 15/6, 2011 at 20:59
2
I have to make this for school:
This is the code I have so far:
import javax.swing.*;
import java.awt.*;
public class AddressBookGui1 extends JFrame {
public AddressBookGui1(){
GridBagLayout...
Landmass asked 20/6, 2013 at 3:25
1
Solved
I am writing the GUI for a chat program. I can't seem to get the scroller to fill the frame horizontally and vertically and the messageInput to fill the frame horizontally. This is how it looks:
...
Laboy asked 22/1, 2016 at 16:52
2
Solved
Here's my code
public class HomeTopPanel extends JPanel {
//BUTTONS
private final JButton myAccountButton = new JButton("My Account");
private final JButton updatePhoto = new JButton("Update Pho...
Goldenrod asked 13/1, 2016 at 15:9
2
Solved
I've got a JFrame whose root JPanel is instantiated with a GridBagLayout. At runtime, the panel is populated with components based on some description, and the width, height and x,y coords are give...
Kare asked 13/7, 2014 at 15:0
5
Solved
So far I managed to avoid using the GridBagLayout (by hand code) as much as possible, but I could not avoid it this time and I am reading the SUN's tutorial GridBagLayout
So far it is not going wel...
Havildar asked 1/9, 2011 at 19:5
1
Solved
I have this vexing source written to demonstrate a layout for a game screen mentioned on another question. It puts buttons (or labels, choosable at start-up) into a GridBagLayout.
If you choose t...
Antipersonnel asked 12/9, 2015 at 16:12
4
Solved
I am trying to create the following GUI:
but the GUI that I make is:
What my grid looks like:
image: THE GRIDLAYOUT FOR THIS
I don't understand why I am getting this output since I have d...
Trichomoniasis asked 18/6, 2014 at 16:47
2
Solved
I have searched all problems like this but I couldn't find the solution.
public class FormPanel extends JPanel
{
private JLabel namelabel;
private JLabel occlabel;
private JTextField nametext;
...
Reg asked 15/12, 2014 at 2:30
2
Solved
I would like to keep a panel I have created using an absolute layout in the center of my window even when the window is resized (if possible). I've come across a couple of suggestions here and [her...
Indeciduous asked 6/11, 2014 at 9:17
2
Solved
I'm trying to use GridBagLayout, but I don't get what I expect and I can't find the error in this code:
public class GridBagEx1 extends JPanel {
private static final long serialVersionUID = 1L;
...
Kanishakanji asked 28/9, 2014 at 19:20
6
Solved
Hi all!
I'm trying to solve an -apparently- simple problem, but I cannot fix it.
I'm working on a sample application with Java/Swing libraries;
I have a JFrame and a JPanel.
I just want to achieve...
Tonneau asked 28/8, 2011 at 20:0
2
I've been trying to set fixed column width in the following code for ages...The thing is that when I add a label to the panel on the left, then the width is incremented automatically...and i Would ...
Emblem asked 16/7, 2014 at 12:11
2
I looked around at all the other answers, but they all recommend to use GroupLayout, BoxLayout, or to wrap the panel that's using GridBagLayout with another panel that uses one of the layouts menti...
Ay asked 20/5, 2014 at 5:36
2
Solved
I am currently trying to create a group of toggle-buttons that are similar to the one's used in the formatter preferences of Eclipse:
Currently I have attempted this in the following way:
publi...
Epizoic asked 23/1, 2014 at 13:58
1
How can I set a fixed width of a JComboboxs popup-menu that is using GridBagLayout and fill=HORIZONTAL?
One of the things I tried is to just override the getSize() method but dose not work.
...
Thanatos asked 8/1, 2014 at 12:21
4
Solved
I am working on a GUI for a project at school. I am using a GridBagLayout in swing.
I want to have a label indicating the input(a type of file @ x = 0, y = 0), followed by another label(the actual...
Keening asked 2/11, 2013 at 2:38
4
I am using a GridBagLayout to create a JPanel, called 'Preset', that gets replicated several times in a JFrame. Each Preset will have multiple rows (JPanels). My goal is that only one line (the fir...
Laminous asked 31/7, 2013 at 14:16
2
Solved
I've have a JFrame contains some JPanels using a gridBagLayout (3 rows, one column). That's my code:
Container main_container = getContentPane();
GridBagLayout layout = new GridBagLayout();
main_c...
Goldsmith asked 20/7, 2013 at 20:5
1
Solved
When I try to align my component it goes either left side or right side.
So I just want the solution to get rid of this problem, and also tell me how set the size of the panel as 400 x 350 pixel....
Unconditioned asked 14/6, 2013 at 5:18
1 Next >
© 2022 - 2024 — McMap. All rights reserved.