Is it possible to create a button, which on clicking, cause a menu to pop up beside it? I just know that I can use JMenuItem and JMenu and add them to JMenuBar...
gghumman@...
Jan 2, 2003 11:39 pm
3227
It is possible to create a drop down button.. Use a JToggleButton . In the actionPerformed of it create a JPopupMenu with JMenuItems. Position the JPopupMenu...
ManojV@...
Jan 3, 2003 4:25 am
3228
Looks to me a JCheckBox can not coexist with a JComboBox? Here is the code. Everytime you click the JCheckBox then you will triger the actionPerformed method...
Lei Gao
gao@...
Jan 3, 2003 5:12 pm
3229
Well, a quick workaround of this is add that ActionListener to the ComboBoxEditor, which usually is a JTextField or something. Then it could work. I do think...
Lei Gao
gao@...
Jan 3, 2003 5:36 pm
3230
Lei Gao said: =>Looks to me a JCheckBox can not coexist with a JComboBox? => =>Here is the code. Everytime you click the JCheckBox then you will triger the ...
Patricia Keith
Patricia.A.Keith@...
Jan 3, 2003 5:44 pm
3231
I can't believe this exists in Swing, but I've found that when I loaded a 2MB file into JTextArea it creates literally 394,000+ java.lang.ref.Finalizer objects...
Joe Consumer
faceless1976@...
Jan 8, 2003 5:07 pm
3232
... Its an Object that encapsulates Objects, that have to be finalized by the Finalizer thread. A short grep shows 3 finalize() methods in the swing text...
Christian Pesch
christian.pesch@...
Jan 9, 2003 11:33 am
3233
Christain, Thanks for the info. THe problem seems to be that OptimizeIt doesn't seem to show these objects being GC'ed even at a slow pace. What is the fix?...
Joe Consumer
faceless1976@...
Jan 9, 2003 3:26 pm
3234
... The finalizer thread runs at a low priority in the hot spot vm. ... Do not use AbstractDocument :-) ... You can't avoid creating the elements. But you can...
Christian Pesch
christian.pesch@...
Jan 13, 2003 11:53 am
3235
Hi, I want to write a Java applet wysiwyg text editor which understands a simple markup language similar to Restructured Text. I'm not a particularly...
Greg Hamilton
gregh@...
Jan 14, 2003 1:58 am
3236
What do I have to do to make my JTable refresh its view automatically whenever I delete a row? Currently if I delete a row I need to resize any of its column...
Ruel Elvambuena
dnoveno@...
Jan 14, 2003 11:17 am
3237
try caling repaint on the table ... -- Regards Vikram Kumar Visit me at http://www.employees.org/~vikram _______________________________________________ ...
Vikram Kumar
vkumar@...
Jan 14, 2003 12:15 pm
3238
You could go to to forum.java.sun.com anf look for Swing Project ther are lot and lot of examples on these that would be helpful. there is also an eKit edsitor...
anil grover
grover_anil_2000@...
Jan 14, 2003 12:23 pm
3239
Have tried it already after deleting a row and I also tried the revalidate then repaint. But none of it solve the problem. Thanks. ... ...
Ruel Elvambuena
dnoveno@...
Jan 15, 2003 2:06 am
3240
HI, Try this... ... DefaultTableModel tableModel; JTable table; ... tableModel.getDataVector().remove(index); // make any changes to the model ...
ManojV@...
Jan 15, 2003 3:31 am
3241
Tried using the code below but still doesn't work. messageTbl.setModel(tableModel); tableModel.getDataVector().remove(messageTbl.getSelectedRow()); ...
Ruel Elvambuena
dnoveno@...
Jan 15, 2003 6:08 am
3242
Hi , Once u create and set a Model to the JTable, u must not set a new one each time..From the code below it seems u are setting the model after setting the...
ManojV@...
Jan 15, 2003 6:29 am
3243
I want to align my MenuItems such that all the "Text Only" MenuItems and "Text with Icon( Text is to the right of icon)" are aligned i.e the text of each...
pugupta@...
Jan 15, 2003 7:44 am
3244
Hi, this is more usability than Swing, so if there's a more appropriate forum then please let me know. I'm wondering whether it's good practice to prompt the...
Paul Kavanagh
paul@...
Jan 15, 2003 5:20 pm
3245
... Step 3 (firing the change notification) is really the responsibility of the model not the user of the model. If you are using DefaultTableModel it's...
Prescott, Ralph
ralph_prescott@...
Jan 15, 2003 5:48 pm
3246
It depends on the application (startup time, loss of data, irritation for the user if he didnt intend to do that) but in my personal experience with my own...
Sachin Hejip
sachinh@...
Jan 16, 2003 4:27 am
3247
This fix my problem... Guys thanks a lot to your assistance... I learned a lot from your suggestion... public void valueChanged(ListSelectionEvent e) { ...
Ruel Elvambuena
dnoveno@...
Jan 16, 2003 8:41 am
3248
Hello, I have a JTabbedPane in which when I click a specific tab I launch ProgressMonitor that shows progress of file that is being read. After ProgressMonitor...
Aleksandr Kravets
akravets@...
Jan 16, 2003 2:55 pm
3249
You need to respect the fact that Swing is single threaded. http://java.sun.com/products/jfc/tsc/articles/threads/threads1.html For simple cases, you don't...
Prescott, Ralph
ralph_prescott@...
Jan 16, 2003 6:41 pm
3250
Hi all, I am facing some problem while editing JTable cell. I am trying to highlight the cell text as soon as one click on a particular cell,so that a user can...
Mohit Gupta
mohit.gupta@...
Jan 20, 2003 12:18 pm
3251
I find applications that do this very annoying. Also, I seem to remember Cooper metioning this several times in "About Face" as a bad idea. If you are going to...
Bill W. Davis
bdavisx@...
Jan 20, 2003 4:13 pm
3252
Hello, I have a custom JComboBox class where I set a ToolTip for each item. It works in times when I send a populated vector to the class. However, sometimes I...
Aleksandr Kravets
akravets@...
Jan 28, 2003 3:28 pm
3253
... You should wrap a ComboBoxModel around your Vector or subclass DefaultComboBoxModel. As ComboBoxModel is a ListModel, it informs about changes. So if you...
Christian Pesch
christian.pesch@...
Jan 28, 2003 3:44 pm
3254
Any idea guys how to display a particular leaf in a JTree? I want my JTree to go to a particular leaf automatically everytime I load it. Tia. ...
Ruel Elvambuena
dnoveno@...
Jan 31, 2003 9:03 am
3255
Need help. The problem is Internal Frames do show up properly. I have extended JDesktopPane and i "add" it to JFrame's contentPane. My extended class...