d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Java Jlabel , Jtextfield
Add Reply New Topic New Poll
Member
Posts: 122
Joined: Feb 20 2014
Gold: 99.05
Warn: 10%
May 7 2014 08:50pm
how to set my window with

JLabel JTextField
JLabel JTextField
JLabel JTextField
JLabel JTextField
JLabel JTextField

Jbutton_1 JButton_2



OR

JLabel
JTextField
JLabel
JTextField
JLabel
JTextField

button_1 button_2


I figured how to have my menu , how to set the JButton but I have trouble to fix my JLabels/Jtextfield

I want if , it is possible to set a size for the jtextfield so it looks better

I have tried borderlayout , it's fine for a single "JLabel JTextField "
else it sucks

then the gridlayout , but if i have only 1 or 2 "JLabel JTextField " it sucks and only works "well" if i have many jlabel/jtextfield

help please

This post was edited by nizarithe on May 7 2014 08:52pm
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Member
Posts: 122
Joined: Feb 20 2014
Gold: 99.05
Warn: 10%
May 7 2014 09:13pm
found out , with absolut positioning


any way to set the window not to be resizeable ?
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
May 7 2014 09:16pm
Quote (nizarithe @ May 7 2014 11:13pm)
found out , with absolut positioning


any way to set the window not to be resizeable ?

did you even check what methods are available?

http://docs.oracle.com/javase/7/docs/api/javax/swing/JFrame.html
Member
Posts: 21
Joined: Mar 28 2013
Gold: 0.00
May 11 2014 12:23pm
Quote (nizarithe @ May 8 2014 02:50am)
how to set my window with

JLabel JTextField                                   
JLabel JTextField                                 
JLabel JTextField                           
JLabel JTextField                                   
JLabel JTextField

Jbutton_1 JButton_2



OR
   
JLabel
JTextField
JLabel
JTextField
JLabel
JTextField

button_1 button_2


I figured how to have my menu , how to set the JButton but I have trouble to fix my JLabels/Jtextfield

I want if , it is possible to set a size for the jtextfield so it looks better

I have tried borderlayout , it's fine for a single "JLabel JTextField    "
else it sucks

then the gridlayout , but if i have only 1 or 2 "JLabel JTextField " it sucks and only works "well" if i have many jlabel/jtextfield

help please

I'd recommend MigLayout
If you are using Eclipse then Use WindowBuilder, it's built-in anyway:
http://www.eclipse.org/windowbuilder/
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll