Craig Snowbarger

Ranch Hand
+ Follow
since Mar 07, 2001
Merit badge: grant badges
For More
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 Craig Snowbarger

I'm trying to connect to MySQL with the code below and I keep getting the error at the bottom. Any ideas?
Code:

Exception:
Before I waste a lot of time trying to do something that isn't possible, I was wondering if anybody new if it's possible to connect to MYSQL via an applet.
Thanks for your help.
Craig Snowbarger
I am wanting to automatically send an email at a predetermined time. Any suggestions of a good way to implement this?
22 years ago
That may be what I meant, I'm not for sure. Here is a snippet of my JTree Constructor. My JTree is created dynamically from information in a database. You'll have to forgive me for the sloppy code. I hope you can understand it. I guess my Userobject used to create my nodes are strings from my queries.
22 years ago
Hello,
Can somebody explain to me, or point me towards an example of a JTree that will dynamically change individual nodes based on criteria from a different component, such as a Resultset? For example, if you wanted each individual node icon to be set according to it's status in the database - if it's "available" it would have a green icon, if it's "not-available" it would have a red icon.
I know that the TreeCellRenderer is used to do this, but as far as I can tell, it only allows one to change parts of the tree according to criteria/parameters specific to the JTree itself like, "selected", "leaf", "parent", "expanded". Is it possible to change parts of the JTree with parameters from different components?
Regards,
Craig Snowbarger
22 years ago

Originally posted by preeth:
[B]Hi ,
I wrote a program to access records from the database and display records in a tree structure.I was able to do only up to one level.Even though the code works fine the higher level retrieves only one record but the sub level for the first record higher level retrieves all records.The same code works fine if I hard code the tree names instead os names retrieved from the resultset.Some how the while loop brace is creating this problem.Could anybody suggest me a method of doing this.
my code :

[This message has been edited by Jim Yingst (edited August 29, 2000).][/B]


Are you still needing help with this? If so, I have a solution. Let me know.
22 years ago

Originally posted by Aruna Devi:
Hi,
I am trying to set different color for specific nodes in a JTree based on certain conditions.
When I browsed thru lot of sun tutorials and others, I came across TreeCellRenderer class.
I created a DefaultTreeCellRenderer object and attached to the tree through <treeobject>.setCellRenderer( renderer object ).
Then I have put the condition and depending on that I have used the setTextNonSelectionColor() method to try to the change the color. But then this method changes the color for all nodes made later and not for the specific node only.
Please throw some light on this issue.
I would greatly appreciate the help.
Thanks,
Aruna


Did you ever figure out how to do this?
22 years ago
Sanjay,
I found this page on checkboxes in JTrees that may be helpful to you. http://www2.gol.com/users/tame/swing/examples/JTreeExamples2.html
Regards,
Craig Snowbarger
22 years ago
I'm trying to set my JTree to be fully expanded at runtime. I've found the method, setExpandedState(path, state), but I can't figure out how to retrieve the path with out manually selecting it. Any ideas?
Regards,
Craig Snowbarger
22 years ago
Is it possible to configure JavaMail to send plain text emails from a Microsoft Exchange Server? Any help is appreciated.
Regards,
Craig Snowbarger
22 years ago
I discovered the problem. I'm using swing components that IE 5.5 won't support. Oh, well.
22 years ago
Hi,
Do applets have to be located on a server to be viewed from a browser rather than the appletviewer? I'm wanting to view my applet from my browser. The class file and html file are located in my local Java bin. Thanks for any help.
Regards,
Craig Snowbarger
22 years ago
Correct. I am using MS Access and, therefore, have to use the ODBC/JDBC Bridge for now. This program is for my companies internal use and doesn't require web access for now, although I would like to eventually (if the over all concept of the program goes over well) move to a more permanent database server solution. Right now, though, we can't afford to do that.
22 years ago
In my stand-alone Java Application running on Windows, I'm looking for a way to detect whether a Data Source Name (DSN) has been registered with the system, and if it hasn't , to do so at runtime. Any ideas?
22 years ago