Java JLabel question

  • From: "Gilbert Neiva" <gneiva@xxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Tue, 30 Nov 2010 11:48:40 -0700

How do you put a String into a JLabel. I've tried.

String occupance1 = "" + GuiApartment.apartment_occupance;
Scanner inData = new Scanner(occupance1);
GuiApartment.occupance1 = inData.next.next(); // GuiApartment.occupance1 is a 
label in another class

It doesn't work. I get an error message telling me that it found a String and 
it requires a label. I am completely stumped as to how to solve this problem.

Gilbert Neiva

Other related posts:

  • » Java JLabel question - Gilbert Neiva