yogita shinde
JLabel
1 Answer(s)      4 years and 3 months ago
Posted in : Swing AWT

how to give dimensions to JLabel?

Advertisement
View Answers

March 28, 2011 at 4:40 PM


using setBounds() you can...pass 2 cordinate values top left and bottom right....it will place the label in the specified location...










Related Tutorials/Questions & Answers:
JLabel
JLabel  how to give dimensions to JLabel
JLabel class - Java Beginners
JLabel class  what are the superclasses of the JLabel class? Thanks taylordk@nationwide.com  Hi Friend, JComponent class... of JLabel class. Thanks
Advertisements
Changing JLabel with a jcombobox - Java Beginners
Changing JLabel with a jcombobox  Hi, I have a JLabel which should change when i select an item from JCombobox.I have some calculations after i get a value from the combo,the result of which i have to display using a JLabel I
Can iadd StringTokenizer into JLabel componenet
Can iadd StringTokenizer into JLabel componenet  l24...,". "); String mn3=(String)mn1; nowon=new JLabel(mn3);//label nowon.setBounds... element in JLabel component is it possible. Output should be like this india
How to create Runtime time jLabel in java swing ?
How to create Runtime time jLabel in java swing ?   hi sir. my problem is that i want to display database row on a jLabel. Suppose i retrived a table from database & i want to display its row value on jLabel. i m facing
How to change backgroundcolor and foreground color of JLabel in Java - Java Beginners
How to change backgroundcolor and foreground color of JLabel in Java  How to change backgroundcolor and foreground color of JLabel in Java  ...*; class DisplayData{ JLabel lab; JTextField text; JButton button; JPanel p
Hi,
java compilation error - Java Beginners
information private final JLabel nameLabel = new JLabel( "Product Name: "); private JTextField nameText; private final JLabel numberLabel = new JLabel(" Product Number: "); private JTextField numberText; private final JLabel
Swings - Java Beginners
; public class text7 extends JFrame implements ItemListener { JLabel label; private JLabel jLabel1; private JLabel jLabel2; private JLabel jLabel3; private JLabel jLabel4; private JLabel jLabel5; private JLabel jLabel6
Problem with Java Source Code - Java Beginners
; JFormattedTextField BirthDate,EnrollmentDate; JTextField MiddleName; JLabel id...; int cnt=1; JLabel ImageLabel; String imagename = "steam.gif...(this); MAINPANEL.setLayout(null); JLabel recLabel=new JLabel
Mr
{ // Variables declaration private JLabel labH1; private JLabel labH2; private JLabel labH3; private JLabel labH4; private JLabel labH5; private JLabel labV1; private JPanel contentPane; //----- private
neo mathabe(neomathabe@yahoo.com)
{ // Variables declaration private JLabel labH1; private JLabel labH2; private JLabel labH3; private JLabel labH4; private JLabel labH5; private JLabel labV1; private JPanel contentPane; //----- private JPanel
Text Files
JApplet { /*Declaring the variables. */ JPanel panel; JLabel lNortelLtd; JLabel lDealerName; JLabel lLocation; JLabel lYearsofExperience; JButton submit
Java Swing Set And Get Values
); //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JLabel fNameLabel = new JLabel("First Name "); JLabel sNameLabel = new JLabel("Second Name "); JLabel phNumLabel = new JLabel("Phone Number "); String firstName = s.getFirstName
java swings - Java Beginners
GridLayout(4,2)); JLabel l1=new JLabel("Item Id:"); JLabel l2=new JLabel("1"); JLabel l3=new JLabel("Item Name:"); JLabel l4=new JLabel("Chocolates"); JLabel l5=new JLabel("Price:"); JLabel l6=new JLabel("Rs
swings - Java Beginners
*; public class client1 extends JFrame { private JLabel jLabel1; private JLabel jLabel2; private JLabel jLabel3; private JLabel jLabel4; private JLabel jLabel5; private JLabel jLabel6; private JLabel jLabel7
swings - Java Beginners
*; public class client1 extends JFrame { private JLabel jLabel1; private JLabel jLabel2; private JLabel jLabel3; private JLabel jLabel4; private JLabel jLabel5; private JLabel jLabel6; private JLabel jLabel7
adding background image - Java Beginners
"); JButton button2 = new JButton ("Clear"); JLabel label = new JLabel ("Full Name"); JLabel label2 = new JLabel ("Age"); JLabel label3 = new JLabel ("English"); JLabel label4 = new JLabel ("Mathematics"); JLabel label5
ERROR with my JAVA code - Java Beginners
class FinalProject extends JFrame implements ActionListener { JLabel textPrompt; JTextArea inputText; JLabel keyPrompt; JTextField inputKey... JPanel p1 = new JPanel(); JLabel label4,label5,lable6; final JTextField
file reader
_ON_CLOSE); JLabel label = new JLabel("Enter the filename with file path:"); JLabel label2= new JLabel("Press the button"); JPanel panel = new JPanel..."); panel.add(b3); JLabel label1= new JLabel("Supervisor"); panel.add(label1
frame
){ JFrame f=new JFrame(); JLabel label1=new JLabel("Name: "); JLabel label2=new JLabel("Address: "); final JTextField text1=new JTextField(20
Swing programming - Java Beginners
().setLayout(null); JLabel lbl1 = new JLabel("Name"); JTextField jt1=new JTextField(15); JLabel lbl2 = new JLabel("Age"); JTextField jt2=new JTextField(15); JLabel lbl3 = new JLabel("Gender"); JPanel jp=new JPanel(); JRadioButton
Combobox program - Java Beginners
(null); JLabel lbl1 = new JLabel("Name"); JTextField jt1=new JTextField(15); JLabel lbl2 = new JLabel("Age"); JTextField jt2=new JTextField(15); JLabel lbl3 = new JLabel("Gender"); JRadioButton Male,Female; ButtonGroup radioGroup=new
question
p1,p2,p3,p4; JTabbedPane tp; JLabel l1, l2, l3...(); s.applyPattern("dd/mm/yyyy"); //insertion l1=new JLabel("Employee ID:"); l2=new JLabel("Employee First Name:"); l3=new JLabel("Employee
Java Final Project Error - Java Beginners
{ JLabel textPrompt; JTextArea inputText; JLabel keyPrompt; JTextField... Panel JPanel p1 = new JPanel(); JLabel label4,label5,lable6; final JTextField text4,text5,text6,text13; label4 = new JLabel(); label4.setText
hi - Java Server Faces Questions
"); CUSTOMER.setBorder(title); JLabel cusLabel=new JLabel("Customer Name...(189,58,85,20); CUSTOMER.add(cusField); JLabel fatLabel=new JLabel("Father...); fatField.setBounds(189,98,85,20); CUSTOMER.add(fatField); JLabel vilLabel=new
java - Swing AWT
; JLabel label1,label2,label3,label4,label5,label6; final JTextField text1,text2,text3,text4,text5,text6; Form(){ label1 = new JLabel(); label1.setText... JLabel(); label2.setText("University:"); text2 = new JTextField(20
createCustomer method in Java - Java Beginners
); JLabel dateLabel = new JLabel( "Todays Date" ); dateLabel.setBounds( 10, 15, 150, 20... = new JPanel(); pools.setLayout( null ); JLabel lengthLabel = new JLabel...(); lengthText.setBounds( 260, 15, 150, 20 ); pools.add( lengthText ); JLabel widthLabel
SWING - Swing AWT
SWING  how to insert image and components such as JLabel,JButton... java.awt.image.*; import javax.imageio.*; class DisplayData{ JLabel lab1,lab2,lab3...; DisplayData(){ lab1=new JLabel(); lab2=new JLabel(""); lab3=new JLabel("Name