Swamy Vatti

Ranch Hand
+ Follow
since May 02, 2001
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Swamy Vatti

its option 4
javax.sql.Connection
Hi everyone,
I have a strange problem in using Drag and Drop in a JTree. I have a JTree which implements drag and drop. The tree behaves perfectly as I need when I run it separately(with only the tree in a frame). But when I use the same tree without any change in my application(lot of other components besides it), the drop methods are not called. ie the tree is listening to the drag operation but not the drop operation.
I am struggling to find out what exactly is the problem but in vain.
Any pointers to this will be very much helpful.
Thanks
Vatti
19 years ago
public void treeWillExpand(TreeExpansionEvent e) throws javax.swing.tree.ExpandVetoException {
TreePath path = e.getPath();
//The last component in the path is the exapanded node
}
19 years ago
Can anyone point me to some tutorials on Overlay Layout.
Thanks
19 years ago
Reload the parent node. It'll be refreshed
20 years ago
Try to revalidate/repaint the table after calling the addRow method in the actionPerformed of the button.
20 years ago
I know very less about JTextComponents. I went thru the API and could not find a solution for my problem. ie Part of the component should be read only(the heading) and the other part should be editable. How can I achieve this. How can I put a textfield into a textcomponent?
Thanks Gaghe for the reply
20 years ago
Similar to the way u added a cell editor(JCombo), u have to add a cell renderer(JCombo) to the table.
20 years ago
Hi....
Can any one tell me which TextComponent should I use if it has to be partly editable.
Thanks a million
Swamy
20 years ago
I am implementing drag and drop using Jtable and JTree.
ie I can drag and drop(rearrange) nodes. I can drop into the same tree from a JTable. The problem is how can I differentiate or how can I know that the drag originated from a JTree/JTable.
I could successfuly implement rearranging the nodes. but the problem is with the table.
does anyone have ideas and help me!!!
20 years ago
Am I clear to you guys?
Any ideas?
20 years ago
Hi All
I am using Drag and Drop for JTree.
I want to highlight the target node(make the text bold) when drag is started and the cursor is over a target node. I tried retrieving the renderer. But could not succeed. Can anyone help me out...
Thanks in advance
20 years ago
Hi,
Can you give me some more info, the sequence of events...
Like after editing the cell, what do you do?
I had the same problem and now its working perfect.
Can you tell me what JDK version are you using?
20 years ago
Thanks Stevens...
But I dont need code examples. I need some high level info so that we can design the basic framework.
If anyone can find a small demo project where I can get this info, it'll be very helpful.
Thanks once again
20 years ago
Hemal,
for every row you should have a flag(false). and update this flag(true) in the setValueAt method.
So when you save(ie click a button to save), just take out the rows which have this flag true;
Similarly if you want to go cell level, then you should be having a flag for each cell. I guess there is no other work around direct from the API.

20 years ago