Peter Deschamps

Greenhorn
+ Follow
since Aug 04, 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 Peter Deschamps

Thanks Kate. I appreciate your assistance! I know wripping out code snippets can be a pain.
thanks again,
P
16 years ago
Common Dialog Boxes
The find, login, preferences, and progress dialog boxes are common in many applications. These dialog boxes are not supplied by the JFC. The following sections show simple versions of these dialog boxes that are consistent with the Java look and feel. You can adapt the designs for these dialog boxes to suit your needs
>>
I find it funny that JAVA doesn't include one as tight little object. I saw a few samples in my travels but always assumed that there was a "common" object available. I'll use the one in the first link as my starting point. Here is some stuff a friend found for me:
http://java.sun.com/products/jlf/ed2/book/HIG.Dialogs3.html#40190
Sample code for above example. http://java.sun.com/products/jlf/ed2/samcode/findia.html
http://ise.fdns.net/freestuff/kappalayout/doc/using_layouts.html
16 years ago
Hi,
I have a similar issue where if a user double clicks on a child node and the UserObject indicates it is of a cetain type (i.e. GOTO type node), then the user "jumps" to the node indicated and expands it accordingly. Extended one step further, if the user right clicks and selects the popup menutiem, "Show cross references", the tree automatically displays and highlights the selected nodes of this "set" ie xref.
I think based on reading some message threads that a Hashmap method which crossrefs node objects with node string keys might make sense. I resisted the hashmap idea early on in my JTree endeavors only because I figured that the JTree already had node objects and I was safer scanning and searching the JTree than to trust that my hashmap was perfectly identically to the JTree. I am not a hash expert and didn't want two duplicate structures of 1000 nodes (the Jtree and the hashmap). Saying all that, it still doesn't make sense to me to scan and rescan a JTree of 1000 nodes linearly and creating the hash should be super fast. comments?
Peter
16 years ago
I need a standard FIND, FINDNEXT java object (modeless dialog box) that receives user input to search for, match whole word, match case, up/down, findnext and cancel buttons...you know the one that we all use everywhere.
I tried searching google, sun and the like but can't find this very common object. BTW, I am using JBuilder 4 IDE.
thanks in advance,
Peter
16 years ago
I have this tree, whose nodes I create from a database. As I read in the details for each node, I create the node, add it to the Tree, and enter it into a hashMap.
>>>>
Hi, I have a very similar business problem. I use an Oracle 8i
database stored procedure to return a cursor containing my list
of nodes and their properties.
1. I populate all the nodes into the JTree first right under the ROOT level.
2. then I make a second pass of the tree and move all the nodes under their parent nodes.
I have to make the second pass since I cannot add a node to a tree under a parent if the parent node doesn't yet exist (i.e. parent is farther down in my list). Yes, this second pass gets longer and longer as I move each child and have to search for its parent based on a Child's UserObject property (String parentnodeid).
This all works fine. I thought about perhaps using the HashMap idea but didn't (yet...). My JTree has about 1000 nodes so it isn't a trivial tree. The database retrieval using the cursor is 3 to 4 times as slow as the 1&2 pass tree populating routine so performance was not that big a deal.
Now here's the problem/issue and my design has me concerned:
I need to add 'searching' capabilities, expand/collapse, auto-scroll, just like you described. Since your Tree code seems to do EXACTLY what I need, any chance you could share it? I'd be most grateful.
Peter
PS.
Also I need a standard FIND, FINDNEXT java object that receives user input to search for, then I'd call my JTree search function.
I tried searching google, sun and the like but can't find source code for this very common object. BTW, I am using JBuilder 4 IDE.
16 years ago