bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-classpath] [bug #13677] JToggleButton isnt correctly showing its in


From: anonymous
Subject: [bug-classpath] [bug #13677] JToggleButton isnt correctly showing its information on paramString (fix included)
Date: Thu, 7 Jul 2005 16:32:29 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4

URL:
  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13677>

                 Summary: JToggleButton isnt correctly showing its information
on paramString (fix included)
                 Project: classpath
            Submitted by: None
            Submitted on: Don 07.07.2005 um 12:32
                Category: classpath
                Severity: 3 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
        Platform Version: Mandrake 9.x

    _______________________________________________________

Details:

The following testcase shows that JToggleButton has a wrong output if we make
a e.getSource() on a event that has been triggered by a JToggleButton.

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class testcase extends JFrame implements ActionListener {
        public static void main(String[] args) {
                new testcase().show();
        }

        public testcase() {
                JToggleButton asdf = new JToggleButton("asdf");
                this.add(asdf);
                asdf.addActionListener(this);                           
                this.setSize(new Dimension(400, 400));
        }

        public void actionPerformed(ActionEvent e) {
                System.out.println("actionPerformed,adsf="
                                + e.getSource());
        }
}

To solce this, in the class javax.swing.JToggleButton the following change has
to be made:

change this method:

protected  String paramString()
  {
    return "JToggleButton";
  }

to this one:

protected  String paramString()
  {
    return super.paramString();
  }






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=13677>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]