Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 21 of 21

Thread: NullPointerException with JSlider

  1. #1
    Member
    Join Date
    May 2013
    Posts
    42
    Thanks
    0
    Thanked 5 Times in 1 Post

    Default NullPointerException with JSlider

    First of all, here is my code:

    MyControlPanel.java
    package calculations;
     
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.event.ChangeEvent;
    import javax.swing.event.ChangeListener;
     
    public class MyControlPanel extends javax.swing.JPanel
    {
        private MyShape theShape;
     
        static int min = 0;
        static int max = 100;
        static int initial = 0;
     
        JSlider jSlider;
        JLabel jLabel1;
        JLabel jLabel2;
        JLabel jLabel3;
        JTextField jText1;
        JTextField jText2;
     
        public MyControlPanel() 
        {
            initComponents();
     
            jSlider = new JSlider(JSlider.HORIZONTAL, min, max, initial);
            jSlider.setMajorTickSpacing(10);
            jSlider.setMinorTickSpacing(1);
            jSlider.setPaintLabels(true);
            jSlider.setPaintTicks(true);
            jSlider.setValue(70);
     
            jSlider.addChangeListener(new MyChangeAction());
            jText1 = new JTextField("Displaying JSlider value");
     
            jText1 = new JTextField();
            jText2 = new JTextField();
     
            jText1.setText("");
            jText2.setText("");
     
            jLabel1 = new JLabel();
            jLabel2 = new JLabel();
            jLabel3 = new JLabel();
     
            jLabel1.setText("Shape Dimension");
            jLabel2.setText("Boundary Length = ");
            jLabel3.setText("Area = ");
     
            this.add(jSlider) ;
            this.add(jLabel1) ;
            this.add(jLabel2) ;
            this.add(jText1) ;
            this.add(jLabel3) ;
            this.add(jText2) ;
     
            setLayout(new FlowLayout());
        }
     
        public void setShape(MyShape suppliedShape)
        {       
            theShape = suppliedShape;
        }
     
            public class MyChangeAction implements ChangeListener
            {
                @Override
                public void stateChanged(ChangeEvent e) 
                {
                    double sliderValue = jSlider.getValue();
                    double area;
                    double boundaryLength;
     
                    String str = Double.toString(sliderValue);
                    jLabel1.setText(str);
     
     
                    area = theShape.getArea(sliderValue);
                    boundaryLength = theShape.getBoundaryLength(sliderValue);
     
                    jText1.setText(Double.toString(Math.round(boundaryLength)));
                    jText2.setText(Double.toString(Math.round(area)));  
     
                }            
            }
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
        private void initComponents() {
     
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
            this.setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 400, Short.MAX_VALUE)
            );
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 300, Short.MAX_VALUE)
            );
        }// </editor-fold>                        
        // Variables declaration - do not modify                     
        // End of variables declaration                   
    }

    MyFrame.java
    package calculations;
     
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
     
    public class MyFrame extends javax.swing.JFrame implements ActionListener
    {   
        public MyShape myShape;
     
        JMenuItem square = new JMenuItem();
        JMenuItem triangle = new JMenuItem();
        JMenuItem circle = new JMenuItem();
     
        MyControlPanel theControlPanel = new MyControlPanel();
     
        public MyFrame() 
        {
            initComponents();
     
            JMenuBar jMenuBar = new JMenuBar();
     
            JMenu Shape = new JMenu();
     
            Shape.setText("Shape");
     
            square.addActionListener(new MySquareAction());
     
            triangle.addActionListener(new MyTriangleAction());
     
            circle.addActionListener(new MyCircleAction());
     
            square.setText("Square");
            triangle.setText("Triangle");
            circle.setText("Circle");
     
            jMenuBar.add(Shape);
     
            Shape.add(square);
            Shape.add(triangle);
            Shape.add(circle);
     
            setJMenuBar(jMenuBar);
     
            MyControlPanel controlPanel = new MyControlPanel();
     
            setLayout(new FlowLayout());
     
            this.add(controlPanel);  
        }
     
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
        private void initComponents() {
     
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
     
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 400, Short.MAX_VALUE)
            );
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 300, Short.MAX_VALUE)
            );
     
            pack();
        }// </editor-fold>                        
        public static void main(String args[]) 
        {
            /* Set the Nimbus look and feel */
            //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
            /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
             * For details see [url=http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html]How to Set the Look and Feel (The Java™ Tutorials > Creating a GUI With JFC/Swing > Modifying the Look and Feel)[/url] 
             */
            try {
                for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                    if ("Nimbus".equals(info.getName())) {
                        javax.swing.UIManager.setLookAndFeel(info.getClassName());
                        break;
                    }
                }
            } catch (ClassNotFoundException ex) {
                java.util.logging.Logger.getLogger(MyFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
            } catch (InstantiationException ex) {
                java.util.logging.Logger.getLogger(MyFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
            } catch (IllegalAccessException ex) {
                java.util.logging.Logger.getLogger(MyFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
            } catch (javax.swing.UnsupportedLookAndFeelException ex) {
                java.util.logging.Logger.getLogger(MyFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
            }
            //</editor-fold>
     
            /* Create and display the form */
            java.awt.EventQueue.invokeLater(new Runnable() 
            {
                @Override
                public void run() 
                {
                    new MyFrame().setVisible(true);
                }
            });
        }
        // Variables declaration - do not modify                     
        // End of variables declaration                   
     
        @Override
        public void actionPerformed(ActionEvent e) 
        {
     
        }
     
    public class MySquareAction implements ActionListener
        {
        @Override
            public void actionPerformed(ActionEvent e)
            {
                myShape = new Square();
                theControlPanel.setShape(myShape);
            }  
        }
     
    public class MyTriangleAction implements ActionListener
        {
        @Override
            public void actionPerformed(ActionEvent e)
            {
                myShape = new Triangle();
                theControlPanel.setShape(myShape);
            }
        }
     
    public class MyCircleAction implements ActionListener
        {
        @Override
            public void actionPerformed(ActionEvent e)
            {
                myShape = new Circle();
                theControlPanel.setShape(myShape);
            } 
        }
    }

    If you want you can download my whole program here: http://www.filedropper.com/calculations

    Sorry If download links aren't allowed, ill remove it straight away if so.

    When i run the program and move the slider it is meant to calculate the boundary length and area, of the chosen shape, which is chosen using the menuItems(Circle, Square, Triangle).

    When i move the slider, I get a this error:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    	at calculations.MyControlPanel$MyChangeAction.stateChanged(MyControlPanel.java:79)
    	at javax.swing.JSlider.fireStateChanged(JSlider.java:432)
    	at javax.swing.JSlider$ModelListener.stateChanged(JSlider.java:350)
    	at javax.swing.DefaultBoundedRangeModel.fireStateChanged(DefaultBoundedRangeModel.java:364)
    	at javax.swing.DefaultBoundedRangeModel.setRangeProperties(DefaultBoundedRangeModel.java:302)
    	at javax.swing.DefaultBoundedRangeModel.setValueIsAdjusting(DefaultBoundedRangeModel.java:231)
    	at javax.swing.JSlider.setValueIsAdjusting(JSlider.java:652)
    	at javax.swing.plaf.basic.BasicSliderUI$TrackListener.mousePressed(BasicSliderUI.java:1632)
    	at javax.swing.plaf.synth.SynthSliderUI$SynthTrackListener.mousePressed(SynthSliderUI.java:924)
    	at java.awt.Component.processMouseEvent(Component.java:6502)
    	at javax.swing.JComponent.processMouseEvent(JComponent.java:3320)
    	at java.awt.Component.processEvent(Component.java:6270)
    	at java.awt.Container.processEvent(Container.java:2229)
    	at java.awt.Component.dispatchEventImpl(Component.java:4861)
    	at java.awt.Container.dispatchEventImpl(Container.java:2287)
    	at java.awt.Component.dispatchEvent(Component.java:4687)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4489)
    	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    	at java.awt.Container.dispatchEventImpl(Container.java:2273)
    	at java.awt.Window.dispatchEventImpl(Window.java:2719)
    	at java.awt.Component.dispatchEvent(Component.java:4687)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
    	at java.awt.EventQueue.access$200(EventQueue.java:103)
    	at java.awt.EventQueue$3.run(EventQueue.java:694)
    	at java.awt.EventQueue$3.run(EventQueue.java:692)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    	at java.awt.EventQueue$4.run(EventQueue.java:708)
    	at java.awt.EventQueue$4.run(EventQueue.java:706)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)

    Can anyone help me with this ? Probably easier if you download my program..

    Thanks in advance!


  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: NullPointerException with JSlider

    What variable is null on line 79 of MyControlPanel.java?

    You can use a debugger, or some print statements, to figure it out.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Member
    Join Date
    May 2013
    Posts
    42
    Thanks
    0
    Thanked 5 Times in 1 Post

    Default Re: NullPointerException with JSlider

    line 79 is this:
    area = theShape.getArea(sliderValue);

    I don't know how to do that, hence why i came here for help.

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: NullPointerException with JSlider

    Your error means that a variable you're dereferencing (using the dot operator) is null. You can't dereference a null variable.

    The only variable you're dereferencing in this line is your theShape variable (by using the dot operator to call the getArea() method), so it must be null. Add this line right before that to test that out:

    System.out.println(theShape == null);

    When do you set the value of theShape?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Member
    Join Date
    May 2013
    Posts
    42
    Thanks
    0
    Thanked 5 Times in 1 Post

    Default Re: NullPointerException with JSlider

    i have this method in my MyControlPanel class:
    public void setShape(MyShape suppliedShape)
        {       
            theShape = suppliedShape;
        }

    which is meant to get the shape from the actionListeners in the MyFrame class for the menuItems, for example:
    public class MySquareAction implements ActionListener
        {
        @Override
            public void actionPerformed(ActionEvent e)
            {
                myShape = new Square();
                theControlPanel.setShape(myShape);
            }  
        }

    When i run the program with the print statement, it comes back 'true'

  6. #6
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: NullPointerException with JSlider

    Well, when is that setShape() method actually called? Again, use a debugger or add print statements like I showed you to figure out. You'll find that this line:

    System.out.println("here");

    will become your best friend as you learn how to debug!
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  7. #7
    Member
    Join Date
    May 2013
    Posts
    42
    Thanks
    0
    Thanked 5 Times in 1 Post

    Default Re: NullPointerException with JSlider

    It is called in my JSlider ChangeListener, it is being used so that whenever say the square is selected from the jMenu (MyFrame class), it sends the selected shape to the MyControlPanel class so that the correct calculation can be chosen and carried out of the sliders value.

    public class MyChangeAction implements ChangeListener
            {
                @Override
                public void stateChanged(ChangeEvent e) 
                {
                    double sliderValue = jSlider.getValue();
                    double area;
                    double boundaryLength;
     
                    System.out.println("1. The shape is: "+theShape);
     
                    String str = Double.toString(sliderValue);
                    jLabel1.setText(str);
     
                    System.out.println("2. The shape is: "+theShape);
     
                    area = theShape.getArea(sliderValue);
                    boundaryLength = theShape.getBoundaryLength(sliderValue);
     
                    jText1.setText(Double.toString(Math.round(boundaryLength)));
                    jText2.setText(Double.toString(Math.round(area)));  
                }            
            }

    to me it would seem that the setShape method isn't working, although I'm not sure even where to start to try and find the error

  8. #8
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: NullPointerException with JSlider

    Are you sure the setShape() method is called before the stateChanged() method? What happens if you don't click a menu first?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  9. #9
    Member
    Join Date
    May 2013
    Posts
    42
    Thanks
    0
    Thanked 5 Times in 1 Post

    Default Re: NullPointerException with JSlider

    I tried clicking each of the shapes, and then moving the slider, i get the null error.

    I tried not clicking the menu and moving the slider, and the same thing happens.


    I tried using:

    System.out.println("The shape is: "+myShape);

    in the menuItem actionListeners, and when I click each shape on the menu I get:

    The shape is: calculations.Square@1ed290f2
    The shape is: calculations.Triangle@e279c82
    The shape is: calculations.Circle@485b0752

    is this what myShape should contain? Surely it should just be, 'Square', 'Triangle' or 'Circle' though I'm not sure

  10. #10
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: NullPointerException with JSlider

    Java doesn't magically know how to print an object. To tell it how to do that, you have to override the toString() method.

    You're printing out the value of myShape. But the variable that's null is theShape. Those are two completely different variables.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  11. #11
    Member
    Join Date
    May 2013
    Posts
    42
    Thanks
    0
    Thanked 5 Times in 1 Post

    Default Re: NullPointerException with JSlider

    but my actionlistener has these lines of code :

                myShape = new Circle();
                theControlPanel.setShape(myShape);
                System.out.println("The shape is: "+myShape);

    so theShape is myShape

    seeing as the setShape() method takes myShape and assigns it to theShape:

    public void setShape(MyShape suppliedShape)//suppliedShape is the shape which is sent from the actionListener for the menuItems
        {       
            theShape = suppliedShape;
        }

  12. #12
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: NullPointerException with JSlider

    You haven't posted your code for MyShape, so I can't run your program.

    I suggest boiling your problem down to an SSCCE and posting that.

    Without seeing an SSCCE, the best I can do is repeat what I already said. Something is null on that line.

    Maybe try posting the full output of your program, including all of the print statements and the NPE.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  13. #13
    Member
    Join Date
    May 2013
    Posts
    42
    Thanks
    0
    Thanked 5 Times in 1 Post

    Default Re: NullPointerException with JSlider

    MyShape.java
    package calculations;
     
    public class MyShape 
    {
           public double getArea(double length)       
           {
               return 0;
           }//end of getArea
     
           public double getBoundaryLength(double length)
           {
               return 0;
           }//end of getBoundaryLength
    }//end of class

    Square.java
    package calculations;
     
    public class Square extends MyShape 
    {   
          public double getArea(double length)    
           {
               return length * length;
           }//end of getArea
     
           public double getBoundaryLength(double length)
           {
               return length + length + length + length;
           }//end of getBoundaryLength
    }

    I posted a download link that allows you to download my full program, if you want to run it.

  14. #14
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: NullPointerException with JSlider

    Quote Originally Posted by jason3460 View Post
    I posted a download link that allows you to download my full program, if you want to run it.
    I am behind a firewall that prevents me from viewing that type of link. Besides, you should make it as easy as possible for other people to help you. The best way to do that is by creating an SSCCE.

    I ended up creating my own SSCCE using String values instead of shape values.

    Hint: how many times do you call the constructor for MyControlPanel? Are you sure?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  15. #15
    Member
    Join Date
    May 2013
    Posts
    42
    Thanks
    0
    Thanked 5 Times in 1 Post

    Default Re: NullPointerException with JSlider

    Thanks!! I was calling MyControlPanel twice.. -__-

  16. #16
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: NullPointerException with JSlider

    Glad you got it figured out. And just to show you the process, I figured that out by putting a print statement inside the constructor. When I saw that printed out twice, I knew something was wrong.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  17. #17
    Member
    Join Date
    May 2013
    Posts
    42
    Thanks
    0
    Thanked 5 Times in 1 Post

    Default Re: NullPointerException with JSlider

    Well thank you so much! Can't believe I didn't realize I had called it twice.

    Now I have to get it so that the shape is drawn on the screen, and changes size depending on the value selected by the slider/shape chosen. I haven't done anything like this before.

  18. #18
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: NullPointerException with JSlider

    Well, a good place to start with custom painting is here: Lesson: Performing Custom Painting (The Java™ Tutorials > Creating a GUI With JFC/Swing)
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  19. #19
    Member
    Join Date
    May 2013
    Posts
    42
    Thanks
    0
    Thanked 5 Times in 1 Post

    Default Re: NullPointerException with JSlider

    Alright thanks a lot, I'll most likely be back for help -__-

    --- Update ---

    One question, would I make a new class for the painting, or would i implement it within the MyFrame or MyControlPanel class ?

  20. #20
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: NullPointerException with JSlider

    Quote Originally Posted by jason3460 View Post
    One question, would I make a new class for the painting, or would i implement it within the MyFrame or MyControlPanel class ?
    You could probably do it either way. Which way did you try?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  21. #21
    Member
    Join Date
    May 2013
    Posts
    42
    Thanks
    0
    Thanked 5 Times in 1 Post

    Default Re: NullPointerException with JSlider

    I tried making a new class, though I've been having a lot of trouble,

    I made a new thread here, your help would be much appreciated, If you want i will post all my code, or any code you would like to see:
    http://www.javaprogrammingforums.com...tml#post132811

Similar Threads

  1. Using a JSlider to change the red contrast of an image on a jLabel
    By Bruz69er in forum What's Wrong With My Code?
    Replies: 0
    Last Post: November 22nd, 2012, 01:40 AM
  2. JSLider with ChangeListener question
    By fatboyhd2k in forum What's Wrong With My Code?
    Replies: 7
    Last Post: June 28th, 2012, 07:39 PM
  3. problems with customising a JSlider
    By Harry Blargle in forum AWT / Java Swing
    Replies: 3
    Last Post: April 1st, 2012, 01:24 PM
  4. How to Use a JSlider - Java Swing
    By neo_2010 in forum Java Swing Tutorials
    Replies: 4
    Last Post: March 29th, 2010, 09:33 AM
  5. How to Use a JSlider - Java Swing
    By neo_2010 in forum Java Code Snippets and Tutorials
    Replies: 4
    Last Post: March 29th, 2010, 09:33 AM