Re: popupmenu and JTable question
"Hello, it's Krishna" <[email protected]>
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <[email protected]> |
Frank, Thank you for the tip, I got the JTable working and in the case of the popupmenu, I actually needed a sub-menu and that works fine. Again, thank you for the help. Thank you, - Krishna Mathis. --- Frank_Meißner <[email protected]> wrote: > Hello, it's Krishna wrote: > > Frank, > > > > Thank you for the quick response. I should have > known > > better to get the popupmenu to show as an event > > response. No, I donot want a checkboxmenuitem. > It's > > a simple behavior similar to traversing a set of > > menuitems of a menu where some of them have > further > > "sub" menuitems. > > > > On the JTable, here's what I have. Please bear > with > > the code since it's an initial quick test. > However, > > the table isn't populated and/or not showing > right. > > Please let me know, if you have other > alternatives. > > > > public class MyTest extends WindowAdapter > implements > > ChangeListener { > > > > // ... some code here ... > > > > public void stateChanged(ChangeEvent e) { > > System.out.println("tabChanged: " + > > tabbedpane.getSelectedIndex()); > > // 2 happens to be my third pane! > > // @ToDo: remove the hard code! > > if (2 == tabbedpane.getSelectedIndex()) { > > tabel5 = new JTable(new > > DefaultTableModel(getData2(), getColumnNames2())); > > } > > }; > > > Here is the problem: you create a new jtable instead > of using the one > you defined using swixml. > > Ok, here is the solution: after creating the > SwingEngine se and a call > to se.render(...) (you must have done so already), > call > JTable table1 = (JTable) > se.getIdMap().get("table1"); > Now continue with table1.setModel(new > DefaultTableModel(...)). At the > moment, you create a JTable without placing it > somewhere (in an outer > container, wherever). > > I think you get the idea... > > Frank > > -- > AuthentiDate International AG > Großenbaumer Weg 6 > 40472 Düsseldorf / Germany > Phone : +49(0)211 43 69 89-0 > FAX : +49(0)211 43 69 89-19 > > TÜV Akademie > Kosten senken durch IT-Sicherheit > 12.-13. Nov., Köln > > Erfahren Sie mehr unter: > www.authentidate.de > > > > _______________________________________________ > Forum mailing list > [email protected] > http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com ===== - Krishna Mathis. Phone: (704) 845-8334 (Charlotte, NC) Mobile: (408) 373-2168 E-mail: [email protected] __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com