[Top][All Lists]

[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


                 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



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.setSize(new Dimension(400, 400));

        public void actionPerformed(ActionEvent e) {
                                + 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:


  Nachricht geschickt von/durch Savannah

reply via email to

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