Closed GoogleCodeExporter closed 9 years ago
Hi nwoedf,
I cannot reproduce this issue. Can you try running
com.explodingpixels.macwidgets.DSourceListClickListener
and verify that you see a printout after clicking an item?
-Ken
Original comment by kenneth....@gmail.com
on 25 Jan 2009 at 6:34
Original comment by kenneth....@gmail.com
on 25 Jan 2009 at 6:34
I have changed some code before testing
SourceList sourceList = DSourceListMail.createSourceList();
To
SourceListModel sm = new SourceListModel();
SourceListCategory slc = new SourceListCategory("saasds");
sm.addCategory(slc);
sm.addItemToCategory(new SourceListItem("First"),slc);
sm.addItemToCategory(new SourceListItem("Second"),slc);
SourceList sourceList = new SourceList(sm);
Original comment by nwoedf@gmail.com
on 26 Jan 2009 at 4:09
Attachments:
This can be reporoduced without using Mac Widgets for Java and looks to be the
following issue, which has
been closed as "Not a Defect":
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6504580
The following code demonstrates the problem with a simple JTree:
JTree sourceList = new JTree(new String[]{
"Node One", "Node Two", "Node Three", "Node Four",
"Node Five"});
sourceList.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
System.out.println("Node clicked.");
}
});
JScrollPane scrollPane = new JScrollPane(sourceList);
JFrame frame = new JFrame();
frame.add(scrollPane, BorderLayout.CENTER);
frame.setSize(225, 250);
frame.setLocationRelativeTo(null);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setVisible(true);
Original comment by kenneth....@gmail.com
on 26 Jan 2009 at 12:05
I think you want to be using a SourceListSelectionListener instead of the more
manual SourceListClickListener.
Original comment by kenneth....@gmail.com
on 26 Jan 2009 at 12:09
It is the problem of Java actually.......Thank for your help
Original comment by nwoedf@gmail.com
on 26 Jan 2009 at 12:34
This is a Java issue -- I can't see a way to work around it at this time.
Original comment by kenneth....@gmail.com
on 19 Jun 2009 at 11:40
Original issue reported on code.google.com by
nwoedf@gmail.com
on 25 Jan 2009 at 2:57Attachments: