wood burning stoves 2.0
The moose likes Swing / AWT / SWT and the fly likes i cant setText to JLabel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "i cant setText to JLabel" Watch "i cant setText to JLabel" New topic

i cant setText to JLabel

Lesole Mphinyane
Ranch Hand

Joined: Oct 07, 2006
Posts: 42
somebody help out..

look at ma code..

i get the following errors...;

cars.java:54: non-static variable model cannot be referenced from a static context
cars.java:55: non-static variable carMake cannot be referenced from a static context
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2451
First of all learn standard Java naming conventions. Every text book or tutorial I've ever seen uses them, so don't make up your own. Class names should start with an upper case.

The variable belong to the "Car" class, not the static method. Move the DB code to the class and out of the main() method.
I agree. Here's the link: http://aspose.com/file-tools
subject: i cant setText to JLabel
It's not a secret anymore!