Results 1 to 3 of 3
  1. #1
    eric_bloodaxe is offline Member
    Join Date
    Feb 2012
    Rep Power

    Default 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");
    setSize(350, 100);

    private void setLookAndFeel(){
    try {
    UIManager.setLookAndFeel(" nimbus.NimbusLookAndFeel");
    } catch (Exception exc) {

    public static void main(String[] args) {
    SalutonFrame sal = new SalutonFrame();

    Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: SetVisible
    at SalutonFrame.<init>(
    at SalutonFrame.main(
    Java Result: 1
    BUILD SUCCESSFUL (total time: 8 seconds)

  2. #2
    eRaaaa is offline Senior Member
    Join Date
    Oct 2010
    Rep Power

    Default Re: SetVisible causing problem


    Do you see the difference?

  3. #3
    eric_bloodaxe is offline Member
    Join Date
    Feb 2012
    Rep Power

    Default Re: SetVisible causing problem

    Thanks, yes I do! Just came back having had another look at the original after another file ran no problems. Was going to delete the post and slink away in embarassment! Still thanks for responding.
    Regards EB

Similar Threads

  1. setVisible does not work
    By michalss in forum AWT / Swing
    Replies: 5
    Last Post: 04-10-2011, 11:35 PM
  2. .setVisible(false); not working... grr...
    By Roclemir in forum New To Java
    Replies: 8
    Last Post: 05-29-2010, 01:22 AM
  3. can't get setVisible(false) to work
    By alexander.s in forum AWT / Swing
    Replies: 0
    Last Post: 04-27-2010, 09:33 PM
  4. [SOLVED] Problem with setVisible(); on LINUX
    By lepetitprince in forum AWT / Swing
    Replies: 9
    Last Post: 11-22-2008, 05:14 PM
  5. setVisible(true) does not work
    By Gajesh Tripathi in forum AWT / Swing
    Replies: 2
    Last Post: 10-27-2007, 08:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts