aspose file tools
The moose likes Swing / AWT / SWT and the fly likes new window within a program... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "new window within a program..." Watch "new window within a program..." New topic
Author

new window within a program...

Brandi Love
Ranch Hand

Joined: Sep 19, 2003
Posts: 133
Forgive me, I'm new at this gui stuff with java.
What I'm trying to do with this code is to create a new window (that is what the FileButtonHandler class is for) when the file button is clicked with a couple of entry fields and some buttons. The problem is that, when I compile, I get this error message for each of the objects I've created withing the FileButtonHandler class:
C:\brandijava\IncomeAnalysis.java:88: illegal start of expression
private JLabel annualIncomeLabel
Anyone have any idea how I might fix this so that the program will compile and I can get the window to pop up?


[ November 21, 2003: Message edited by: Brandi Love ]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24189
    
  34


"private" can only be applied to member variables, not local variables declared inside a method.


[Jess in Action][AskingGoodQuestions]
Brandi Love
Ranch Hand

Joined: Sep 19, 2003
Posts: 133
Should they be declared as public? I tried that and it didn't work.
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
Local variables cannot have access specifiers. They are not going to be accessed from outside the method.


SCJP2. Please Indent your code using UBB Code
 
Consider Paul's rocket mass heater.
 
subject: new window within a program...