Congratulations to AcaCandy on her 100,000th post!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer backup black screen blue screen boot bsod computer connection crash css dell driver drivers email error ethernet excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop linux malware monitor network networking nvidia outlook outlook 2003 outlook 2007 outlook express partition problem router slow software sound trojan usb video virus vista windows windows xp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
labels


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
incorrigible's Avatar
Junior Member with 24 posts.
 
Join Date: Jul 2002
01-Mar-2003, 11:17 PM #1
Unhappy labels
hi
i have a code here where in i have added labels to the JPanel according to the java tutorials

but i cant get to display the labels. i am going nuts.
plz help me

Code:
public void actionPerformed (ActionEvent e)
	{
		String item = e.getActionCommand();
		
		if(item.equals("Close"))
		{
			System.exit(0);
		}
		else if(item.equals("Maintenance"))
		{
			JFrame venMainFrame = new JFrame("Vendor Maintenance");	
			JPanel contentpane = new JPanel();
			contentpane.setPreferredSize(new Dimension(765,690));
			venMainFrame.setContentPane(contentpane);
			//contentpane.setBackground(Color.white);
			venMainFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
			venMainFrame.pack();
			
			setvenfrDesign(venMainFrame);
			venMainFrame.setVisible(true);
		}
	
	} // action Performed ends here

	public void setvenfrDesign(JFrame venMainFrame)
	{
		
		JLabel label1, label2, label3, label4, label5, label6;
		JPanel panel = new JPanel();
		label1 = new JLabel("Vendor Id");
		panel.add(label1);
		getContentPane().add(panel);
		label2 = new JLabel("Vendor First Name");
		label3 = new JLabel("Vendor Last Name");
		label4 = new JLabel("Address");
		label5 = new JLabel("Telephone #");
		label6 = new JLabel("Fax");

		
	} // end of setvenfrDesign
most of my code is in the thread- new to java if u need it.
thanks
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:44 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.