Javax.swing.GroupLayout - problem

Hi
Puzzling problem has occurred when developing the same application on different PC�s and using the same IDE (Netbeans 5.5) on both.
The problem is that the �javax.swing.GroupLayout� class is being used when inserting netbeans GUI components on one of the PC�s. However, the other PC uses �org.jdesktop.layout.GroupLayout� and generates an error when trying to compile the �javax.swing.GroupLayout� components. It cannot find the javax.swing.GroupLayout� class.
The jdk is jdk 6 for both.
Can anyone shed any light on this?
Regards
GB

Did you check the project properties?
Project properties | Categories: Libraries --> Java Platform: JDK 1.6
(javax.swing.GroupLayout works only with 1.6)

Similar Messages

  • JDeveloper 11g javax.swing.GroupLayout

    Does JDeveloper 11g support the Swing class javax.swing.GroupLayout ?
    I did not see this class in the layout combo, and when I edited in the source code, I got an error:
    Field groupLayout not found in class oracle.jdevimpl.uieditor.proxy.JPanel
    Thanks a lot.
    John

    Hi,
    its a Java 6 feature and I am afraid to say that we didn't upgrade Swing to Java 6 in this release
    Frank

  • Where is javax.swing.GroupLayout Class....?

    In the Java 6 Doc I am getting the information about javax.swing.GroupLayout class. But I cpuld not find the class in Jar.
    Am I missing something?
    It will be appriciated If you help me to finding the Jar file for this class.
    Thanks.

    Thanks for help.
    I have got it. As I am using beta version of Java6 in which that class was missing. In the latest version of JDK , I have found that class.

  • Javax.swing.GroupLayout

    Hi
    I have used Netbeans 7 to design my UI screens which uses jdk1.6, but i need to port it to jdk1.4..
    how can i make these changes?

    user7041221 wrote:
    I have used Netbeans 7 to design my UI screens which uses jdk1.6, but i need to port it to jdk1.4..
    how can i make these changes?Display the form in "Design" mode, right click the "Form" node in the "Inspector" window and set the property "Layout Generation Style" to "Swing Layout Extensions Library". Select the source level and java platform in the project properties window (File | Project Properties).
    Cheers,
    André

  • I cant see  GroupLayout in javax.swing.

    What i doing wrong?
    Thanks

    javax.swing.GroupLayout is since version 1.6.
    {color:#000080}If you are getting an error when trying to import the class, you have an earlier version of the jdk.
    If you cannot see the class in the documentation, you are referring to the documentation for an earlier version.{color}
    http://java.sun.com/javase/6/docs/api/javax/swing/GroupLayout.html
    {color:#000080}db{color}

  • Swing GroupLayout Error()

    Hello,
    I have an exception in my Japplet and i can`t find the problem. Can somebody find the exception.
    Thanks in advance
    Bart
    This is the exception:
    Exception in thread "main" java.lang.IllegalArgumentException: Component must be non-null
    at javax.swing.GroupLayout$ComponentSpring.<init>(GroupLayout.java:2878)
    at javax.swing.GroupLayout$ComponentSpring.<init>(GroupLayout.java:2858)
    at javax.swing.GroupLayout$Group.addComponent(GroupLayout.java:1490)
    at javax.swing.GroupLayout$ParallelGroup.addComponent(GroupLayout.java:2414)
    at javax.swing.GroupLayout$ParallelGroup.addComponent(GroupLayout.java:2384)
    at javax.swing.GroupLayout$Group.addComponent(GroupLayout.java:1471)
    at javax.swing.GroupLayout$ParallelGroup.addComponent(GroupLayout.java:2406)
    My Code:
    package gui;
    import javax.swing.*;
    import java.awt.*;
    public class Gui extends JPanel {
        * File:         Gui.java
        * Version:      1.0
        * Description:  The Gui of a simple spot editing tool for the web.
        * @author       Bart
        * Date:         30-10-2008
        @SuppressWarnings("unchecked")
        private JButton btnPost;
        private JLabel lblSpotter;
        private JLabel lblDatum;
        private JLabel lblTijd;
        private JLabel lblVogelsoort;
        private JLabel lblLocation;
        private JLabel lblFoto;
        private JLabel lblCommentaar;
        private JLabel sl1;
        private JLabel sl2;
        private JLabel dp1;
        private JTextField inputSpotter;
        private JTextField inputDag;
        private JTextField inputUur;
        private JTextField inputVogelsoort;
        private JTextField inputMaand;
        private JTextField inputJaar;
        private JTextField inputMin;
        private JTextField inputLocAB;
        private JTextField inputLoc1234;
        private JTextField inputLoc5678;
        private JTextArea inputCommentaar;
        private JScrollPane jScrollPane1;
         * Method: Constructor Gui
         * Description:
        public Gui() {
         * Method: Constructor Gui
         * Description:
        private void init() {
            this.setVisible(true);
         //buttons
         btnPost = new JButton("Verzend");
         //labels
         lblSpotter = new JLabel("Spotter: ");
            lblDatum = new JLabel("Datum: ");
            lblTijd = new JLabel("Tijd: ");
            lblVogelsoort = new JLabel("Vogelsoort: ");
            lblLocation = new JLabel("Location: ");
            lblCommentaar = new JLabel("Commentaar: ");
            sl1 = new JLabel("/");
            sl2 = new JLabel("/");
            dp1 = new JLabel(":");
         //textfields & areas & scrollpane
         inputSpotter = new JTextField();
            inputDag = new JTextField();
            inputUur = new JTextField();
            inputVogelsoort = new JTextField();
            inputMaand = new JTextField();
            inputJaar = new JTextField();
            inputMin = new JTextField();
            inputLocAB = new JTextField();
            inputLoc1234 = new JTextField();
            inputLoc5678 = new JTextField();
            inputCommentaar = new JTextArea();
            inputCommentaar.setColumns(20);
            inputCommentaar.setRows(5);
         jScrollPane1 = new JScrollPane();
            jScrollPane1.setViewportView(inputCommentaar);
         //grouplayout & adding labels,textfields,textareas to layout
            GroupLayout layout = new GroupLayout(this);
            this.setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                        .addComponent(lblCommentaar)
                        .addGroup(layout.createSequentialGroup()
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                .addComponent(lblVogelsoort)
                                .addComponent(lblLocation)
                                .addComponent(lblTijd)
                                .addComponent(lblDatum)
                                .addComponent(lblSpotter)))
                        .addComponent(lblFoto))
                    .addGap(7, 7, 7)
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                        .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                                .addComponent(inputDag)
                                .addComponent(inputUur, GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                .addComponent(sl1)
                                .addComponent(dp1))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                                .addComponent(inputMin, GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE)
                                .addComponent(inputMaand))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(sl2)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(inputJaar))
                        .addComponent(jScrollPane1, GroupLayout.Alignment.LEADING)
                        .addGroup(GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                            .addComponent(inputLocAB, GroupLayout.PREFERRED_SIZE, 53, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(inputLoc1234, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(inputLoc5678))
                        .addComponent(inputSpotter, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 189, Short.MAX_VALUE)
                        .addComponent(inputVogelsoort, GroupLayout.Alignment.LEADING)
                        .addComponent(btnPost))
                    .addContainerGap(31, Short.MAX_VALUE))
            layout.setVerticalGroup(
                layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addGap(26, 26, 26)
                            .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                                .addComponent(lblDatum)
                                .addComponent(inputDag, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                .addComponent(inputMaand, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                .addComponent(inputJaar, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                .addComponent(inputLocAB)
                                .addComponent(inputLoc1234)))
                        .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(lblSpotter)
                            .addComponent(inputSpotter, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(lblTijd)
                        .addComponent(inputUur, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                        .addComponent(inputMin, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                        .addComponent(dp1))
                    .addGap(7, 7, 7)
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(lblVogelsoort)
                        .addComponent(inputVogelsoort, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                        .addComponent(lblLocation)
                        .addComponent(inputLocAB, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                        .addComponent(inputLoc1234, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                        .addComponent(inputLoc5678, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                        .addComponent(lblCommentaar)
                        .addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE, 78, GroupLayout.PREFERRED_SIZE))
                    .addGap(6, 6, 6)
                    .addComponent(lblFoto)
                    .addGap(21, 21, 21)
                    .addComponent(btnPost)
                    .addContainerGap())
          * Method: Start
          * Description:
         public void start() {
          * Method: Stop
          * Description:
         public void Stop() {
          * Method: Destroy
          * Description:
         public void destroy() {
         public static void main(String args[]){
              Gui gui = new Gui();
                    gui.init();
    }

    I`ve changed JPanel into JApplet and init() into go() ,and start(),destroy() and stop() are disabled.
    But at the end i want to have the applet into a webbrowser. And i can`t find the error, GroupLayout layout - new GroupLayout(this) seems good in my vision. The error is on the "this" part, is it possible to give the this a value?
    Complete Exception
    Exception in thread "main" java.lang.IllegalArgumentException: Component must be non-null
            at javax.swing.GroupLayout$ComponentSpring.<init>(GroupLayout.java:2878)
            at javax.swing.GroupLayout$ComponentSpring.<init>(GroupLayout.java:2858)
            at javax.swing.GroupLayout$Group.addComponent(GroupLayout.java:1490)
            at javax.swing.GroupLayout$ParallelGroup.addComponent(GroupLayout.java:2414)
            at javax.swing.GroupLayout$ParallelGroup.addComponent(GroupLayout.java:2384)
            at javax.swing.GroupLayout$Group.addComponent(GroupLayout.java:1471)
            at javax.swing.GroupLayout$ParallelGroup.addComponent(GroupLayout.java:2406)
            at gui.Gui.init(Gui.java:98)
            at gui.Gui.main(Gui.java:212)
    Java Result: 1Thanks in advance,
    Bart

  • Javaclassnotfound javax.swing.JPanel in a applet

    Hi,
    I have a applet which use a class which have the code
    import javax.swing.JPanel;
    public class WebPanel extends JPanel implements Runnable{
    Applet parent;
    i compile it with jdk1.2.2
    my problem is that when i try to run the applet on a Internet Explorer navigator it give me a
    javaclassnotfound javax.swing.JPanel
    problem.
    Javax.swing.JPanel is�nt in IExploter?
    Should i put the javax.swing.Jpanel class in the jar fije?
    Where i can find it?
    Thanks in advance.

    forgot to mention this...get the plug in here:
    http://java.sun.com/products/plugin/
    read the intstructions, u might have to do some 'applet conversion' ....u'll know what I mean when u install the plugin
    good luck

  • Exception problems utilizing javax.swing.UIManager

    I am in the process of creating a simple console environment for a certain application that runs in windows mainly but programmed in Java. Am trying to set the LookAndFeel to windows but it keeps throwing a java.lang.ClassNotFoundException_.
    try {
            javax.swing.UIManager.setLookAndFeel("com.sun.java.plat.windows.WindowsClassicLookAndFeel");
    } catch (Exception e) { System.err.println("Error: "+e); }After thinking I just simply didn't have the package installed correctly I wrote a simple app to check...
    public static void main(String[] args) {
         javax.swing.UIManager.LookAndFeelInfo[] info = javax.swing.UIManager.getInstalledLookAndFeels();
         for(int i=0; i<info.length;i++){
              String LFname = info.getName();
              String className = info[i].getClassName();
              System.out.println(LFname+" : "+className);
    }This gave me the output...Metal : javax.swing.plaf.metal.MetalLookAndFeel
    CDE/Motif : com.sun.java.swing.plaf.motif.MotifLookAndFeel
    Windows : com.sun.java.swing.plaf.windows.WindowsLookAndFeel
    Windows Classic : com.sun.java.swing.plaf.windows.WindowsClassicLookAndFeelSo I can only assume that I have the the necessary resources installed correctly. Any thoughts on what might be causing my problem?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    So I can only assume that I have the the necessary resources installed correctly. Any thoughts on what might be causing my problem?
    com.sun.java.plat.windows.WindowsClassicLookAndFeel // the class you're trying to set
    com.sun.java.plaf.windows.WindowsClassicLookAndFeel // the class that is actually availableSee the difference?
    ~

  • Import javax.swing problems

    hey
    I am new to java and have recently downloaded j2sdk1.4.2_04. I am trying to create a simple graphical application. However, It doesnt seem to import the javax.swing.* libraries. I understand that there is the src.zip in the directory, so I unzipped it but it still doesn't read the package. I read elsewhere on this forum that you should set the path to src.zip. I have tried that and it also doesnt work. My current path is:
    PATH=C:\j2sdk1.4.2_04\lib\src.zip;C:\j2sdk1.4.2_04\bin
    Is there an error in this, or what else should I try? All suggestions greatly appreciated.

    There's no need to set your classpath when importing any of the standard packages that are provided by the JDK. Perhaps you could post a (small) code sample and the compiler error you are getting.

  • Javax.swing.JTextPane - COLOR Problem

    Hi
    I am using javax.swing.JTextPane object to display text recieved from two servers.
    How can I make messages recieved from Server 1 to be in RED and while from Server 2
    to be in Green? i.e. the window should look...
    (red) Server 1 says ta ta
    (green) Server 2 says Hello
    My code looks....
    javax.swing.JTextPane WINDOW;
    String message1 = connection1.getMessage();
    ..........// What code should I put here??? to make this message look RED??
    ..........// Color of previous text should remain as it is...
    WINDOW.setText(WINDOW.getText() + message1);An Example would be highly appreciated.
    Regards
    Fahad

    Hi,
    that is the wrong way - try this method in your JTextPane subclass
    public void appendText(String s,Color col) {
    StyledDocument sd = getStyledDocument();
    SimpleAttributeSet attr = new SimpleAttributeSet();
    StyleConstants.setForground(attr,col);
    try { sd.insertString(sd.getLength(),s,attr); }
    catch (BadLocationException e) {}
    } // end of methodand use it in your code like that
    WINDOW.appendText(message1,Color.red);
    hope that helps
    greetings Marsian

  • Problem Loading an Image with javax Swing from a JApplet

    First of all, i use JCreator as java creater and have the newest version of java sdk version.
    Now i need to load an image from the harddrive on which the JApplet is located. I need to do this from inside the JApplet. I have put my pictures in a map 'images' which is located in the same directory as the classes + htm file. It works from inside JCreator, but as soon as i open the normal htm it just WON'T load that image (grmbl).
    Here is my code for loading the image:
    public BufferedImage loadImage (String filename, int transparency)
         Image image;
         if (app)
              image = Toolkit.getDefaultToolkit().getImage(("./images/"+filename));
         else
              String location = "";
              location = "./images/"+filename;
              image = Toolkit.getDefaultToolkit().getImage(location);
         MediaTracker mediaTracker = new MediaTracker(new Container());
         mediaTracker.addImage(image, 0);
         try
              mediaTracker.waitForID(0);
         catch (Exception e)
    Could anybody help me out here??
    I tried a url already using getCodeBase() or getDocumentBase() but that gives an error because it cannot find those if using a JApplet.

    Why don't you use javax.swing.ImageIcon? If you already have a flag telling if it's an application or applet, use the getDocumentBase() to base the URL in the applet part only.

  • Java Swing application problem in Windows vista

    When we execute the Swing application in windows vista environment.
    The look and feel of the swing components are displayed improperly.
    Do we need to put any specific look and feel for windows vista environment or any specific hardware configuration is required to setup windows vista environment.
    Please give some inputs to solve the problem.
    We have tried with the following sample code to run in windows vista.
    * Vista.java
    * Created on December 5, 2006, 5:39 PM
    public class Vista extends javax.swing.JFrame {
    /** Creates new form Vista */
    public Vista() {
    initComponents();
    pack();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {
    jButton1 = new javax.swing.JButton();
    jToggleButton1 = new javax.swing.JToggleButton();
    jPanel1 = new javax.swing.JPanel();
    jCheckBox1 = new javax.swing.JCheckBox();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jTextField1 = new javax.swing.JTextField();
    getContentPane().setLayout(null);
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jButton1.setText("Button 1");
    getContentPane().add(jButton1);
    jButton1.setBounds(20, 20, 170, 30);
    jToggleButton1.setText("Togle btn");
    getContentPane().add(jToggleButton1);
    jToggleButton1.setBounds(100, 80, 90, 20);
    jPanel1.setLayout(null);
    jCheckBox1.setText("jCheckBox1");
    jCheckBox1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
    jCheckBox1.setMargin(new java.awt.Insets(0, 0, 0, 0));
    jPanel1.add(jCheckBox1);
    jCheckBox1.setBounds(10, 40, 130, 13);
    getContentPane().add(jPanel1);
    jPanel1.setBounds(10, 150, 200, 130);
    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    jScrollPane1.setViewportView(jTextArea1);
    getContentPane().add(jScrollPane1);
    jScrollPane1.setBounds(210, 150, 164, 94);
    jTextField1.setText("jTextField1");
    getContentPane().add(jTextField1);
    jTextField1.setBounds(240, 30, 140, 30);
    pack();
    }// </editor-fold>//GEN-END:initComponents
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new Vista().setVisible(true);
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JToggleButton jToggleButton1;
    // End of variables declaration//GEN-END:variables
    }

    When we execute the Swing application in windows
    vista environment.
    The look and feel of the swing components are
    displayed improperly.Improperly means what? You must be aware that Vista's native L&F certainly isn't supported yet.

  • Import javax.swing.*;

    I start my programm with:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import rechenwerk.Rechenwerk; import rechenwerk.RechenwerkFassade;
    import zahl.Zahl; import zahl.ZahlFassade;
    import oberflaeche.Oberflaeche;
    At "import javax.swing.*" i get the failure message from the compiler:
    Oktalrechner.java:8: Package javax.swing not found in import.
    import javax.swing.*;
    What is wrong? I don't know-please help me.
    I'm using JDK1.2BETA4

    Tell me when you execute java -version, what you are getting?
    Looks like you are suing old JDK.
    Download the latest public release JDK1.4 from http://java.sun.com
    /Sreenivasa Kumar Majji.
    Did somebody help you? I have a similar problem with
    javax.resource... :(
    I start my programm with:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import rechenwerk.Rechenwerk; import
    rechenwerk.RechenwerkFassade;
    import zahl.Zahl; import zahl.ZahlFassade;
    import oberflaeche.Oberflaeche;
    At "import javax.swing.*" i get the failure message
    from the compiler:
    Oktalrechner.java:8: Package javax.swing not foundin
    import.
    import javax.swing.*;
    What is wrong? I don't know-please help me.
    I'm using JDK1.2BETA4

  • Javax.swing.tree.DefaultMutableTreeNode

    I have a tree with some nodes in it.
    I am using setAllowsChildren(boolean x) method of javax.swing.tree.DefaultMutableTreeNode on the nodes.
    But the problem i m facing is
    1....if setAllowsChildren() method returns true ,i m getting tree icon displayed on side of node(irrespective of whether the node has children or not )
    I m facing with a challenge of allowing node to have children by using
    setAllowsChildren(true) and at the same time display tree icon only when children are present.
    Some of my friends say it is a java bug.
    If not how do i go about solving this one.
    Thanks in advance

    Ok i will put it in another way.
    Is there any other way by which the tree icon can be made to display
    without the usage of[b] setAllowsChildren() method

  • Import javax.swing.JOptionPane

    hello
    i just installed j2sdk1.3.1 into my redhat linux7.3, during installation, everything's fine...
    but when i start to compile a program with some import classes...i face the problem :
    cannot find type "javax/swing/JOptionPane
    this is my program :
    import javax.swing.JOptionPane;
    public class Welcome{
    public static void main(String args[])
         JOptionPane.showMessageDialog(null,"Hello");
         System.exit(0);
    can anybody help me with this problem......?...thanks

    type
    java -versionto see which version of the JVM you are running
    you could also try
    which javato see the actuall executable that you are running.

Maybe you are looking for