Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #4879

Re: Scope of a JLabel? Also "unchecked operation"

From markspace <-@.>
Newsgroups comp.lang.java.gui
Subject Re: Scope of a JLabel? Also "unchecked operation"
Date 2012-01-03 14:10 -0800
Organization A noiseless patient Spider
Message-ID <jdvucg$oq8$1@dont-email.me> (permalink)
References <4f0350b3$0$2549$da0feed9@news.zen.co.uk> <jdvkag$nr7$1@dont-email.me> <4f037187$0$2543$da0feed9@news.zen.co.uk>

Show all headers | View raw


On 1/3/2012 1:22 PM, A B wrote:


> Thanks Mark. I thought that as the ComboBox created by Vectorine() was
> the one calling itemStateChanged(), that would bring itemStateChanged()
> within reach of Vectorine()'s variables, but apparently not. I'm cross
> with "Java In Easy Steps" now, I copied that coding straight out of one


That Java tutorial I linked to is a good start, at least if you need 
something right away.  It's at least correct, although it often glosses 
over details to make it approachable to the newcomer.

Here's the index to the tutorial:

<http://docs.oracle.com/javase/tutorial/java/index.html>


> of its examples, but apparently they never checked that it actually
> worked! I didn't think of creating the labels and things at class level,


Just so you know, "class level" means something else.  The variables you 
need here are almost certainly instance variables, not class variable. 
(Class variables always use the "static" modifier.)  This is just a 
terminology thing, but if you're learning it helps to learn the correct 
terms from the outset.

Here's a primer on the difference:

<http://docs.oracle.com/javase/tutorial/java/javaOO/classvars.html>

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Scope of a JLabel?  Also "unchecked operation" "A B" <@bleBaker.uk> - 2012-01-03 19:02 +0000
  Re: Scope of a JLabel?  Also "unchecked operation" markspace <-@.> - 2012-01-03 11:05 -0800
  Re: Scope of a JLabel?  Also "unchecked operation" markspace <-@.> - 2012-01-03 11:18 -0800
    Re: Scope of a JLabel?  Also "unchecked operation" "A B" <@bleBaker.uk> - 2012-01-03 21:22 +0000
      Re: Scope of a JLabel?  Also "unchecked operation" markspace <-@.> - 2012-01-03 14:10 -0800
        Re: Scope of a JLabel?  Also "unchecked operation" "A B" <@bleBaker.uk> - 2012-01-04 21:05 +0000
          Re: Scope of a JLabel?  Also "unchecked operation" markspace <-@.> - 2012-01-04 13:10 -0800
          Re: Scope of a JLabel?  Also "unchecked operation" "Gavino" <invalid@invalid.invalid> - 2012-01-05 19:54 +0100
            Re: Scope of a JLabel?  Also "unchecked operation" "A B" <@bleBaker.uk> - 2012-01-12 18:51 +0000
  Re: Scope of a JLabel? Also "unchecked operation" "A B" <@bleBaker.uk> - 2012-01-04 20:58 +0000
    Re: Scope of a JLabel? Also "unchecked operation" "A B" <@bleBaker.uk> - 2012-01-12 18:53 +0000

csiph-web