Results 1 to 3 of 3
Thread: SetVisible causing problem
- 03-11-2012, 06:45 PM #1
Member
- Join Date
- Feb 2012
- Posts
- 4
- Rep Power
- 0
SetVisible causing problem
Below I have pasted some code and the error messages it raises. It is supposed to produce a window saying Saluton Mondo. It doesn't do this! The code is copied from a tutor book and as far as I can see it is accurate so why is setVisible throwing an error? is it the code or is it some feature of the NetBeans IDE? it also seems to have a mild issue with catch(Exception exc); if i click in the text it says variable exc is not used.
import javax.swing.*;
public class SalutonFrame extends JFrame {
public SalutonFrame() {
super("Saluton Mondo");
setLookAndFeel();
setSize(350, 100);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
SetVisible(true);
}
private void setLookAndFeel(){
try {
UIManager.setLookAndFeel("com.sun.java.swing.plaf. nimbus.NimbusLookAndFeel");
} catch (Exception exc) {
}
}
public static void main(String[] args) {
SalutonFrame sal = new SalutonFrame();
}
}
run:
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: SetVisible
at SalutonFrame.<init>(SalutonFrame.java:9)
at SalutonFrame.main(SalutonFrame.java:20)
Java Result: 1
BUILD SUCCESSFUL (total time: 8 seconds)
- 03-11-2012, 06:51 PM #2
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
Re: SetVisible causing problem
.....

setVisible
SetVisible
Do you see the difference?
- 03-11-2012, 07:06 PM #3
Member
- Join Date
- Feb 2012
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
setVisible does not work
By michalss in forum AWT / SwingReplies: 5Last Post: 04-10-2011, 10:35 PM -
.setVisible(false); not working... grr...
By Roclemir in forum New To JavaReplies: 8Last Post: 05-29-2010, 12:22 AM -
can't get setVisible(false) to work
By alexander.s in forum AWT / SwingReplies: 0Last Post: 04-27-2010, 08:33 PM -
[SOLVED] Problem with setVisible(); on LINUX
By lepetitprince in forum AWT / SwingReplies: 9Last Post: 11-22-2008, 04:14 PM -
setVisible(true) does not work
By Gajesh Tripathi in forum AWT / SwingReplies: 2Last Post: 10-27-2007, 07:32 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks