Kaushik Gopal

Greenhorn
+ Follow
since Aug 20, 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 Kaushik Gopal

Hi,
I am using a JToolbar which has buttons with pictures on them (i use newImageIcon("Image name") to do this). It was all working fine at home and then when I brought over my code to university the toolbar is hardly visible. The buttons are there, but they are miniscule to say the least. The pictures are not appearing wither. This is important to me because I am designing a Java email client and these are my "Send" "reply" etc. buttons. Please help me. Cheers.
22 years ago
I am designing a java email client. I have used a JTree to display my folders (i.e. Inbox, Outbox, Sent Items etc.). The actual JTree comes up fine as i have created it with static strings. I now want to update the tree using values from a table in my mysql database which contains attributes - username, foldername.
If I get the foldernames using db.getfoldername where username = n, then how do I update the Jtree with these results? Pls help...deadline on the 7th of sept!. Thanks!
22 years ago
Thanks jagan but I have not used a table model. I just create it by myself in the code. I have had a look at table models but do not understand them...is there anyway to bypass this? Please let me know. Cheers.
22 years ago
Hi,
I am designing an Email client and am not a very experienced Java programmer. I am using JTables to display my incoming email. I store my incoming mail in a 2D array results[][] which is got by using a executeQuery(sql query) statement. When I click on a folder (eg INBOX), I want to refresh the JTable and display only the inbox contents. I do this by using the following code:
public void valueChanged(TreeSelectionEvent e) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode)jTree_folderList.getLastSelectedPathComponent();
Object nodeInfo = node.getUserObject();
if (node.isLeaf()) {
// node.toString() is the name of the folder you clicked.
String folder = node.toString();
// Create columns names
String columnNames[] = { "From", "Subject", "Date" };
// Create some data
String dataValues[][] = db.getFolderContents(username, folder);
kgTable = new JTable( dataValues, columnNames );
This code does not put the the results into the JTable and refresh it, but there is no error message either! Pls help me, I have 2 weeks to go b4 submission!
22 years ago