Win a copy of Rust Web Development this week in the Other Languages forum!

Ameet Choughule

Greenhorn
+ Follow
since Feb 08, 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 Ameet Choughule

I have tried the use of .grabFocus() method
yourjtextfieldname.grabFocus();
on an button click event using actionPerformed() method in conjunction with button.addActionListener(this);
Maybe you can work it out when adding the panel or something like that.
Please let me know if it works.
~ameet~
[This message has been edited by Ameet Choughule (edited March 05, 2001).]
20 years ago
Hi Shrilata,
I too faced a similar problem and being an anateur I found layout managers a hopeless part of Java.
But the panelname.setLayout(null) is ideal and gives great looks as you can place components where desired and resizing of frame/window does not affect the components.
The components can be placed by using setBounds as in
Yourcomponent.setBounds(x,y,width,height) and then adding the component to the panel by saying panelname.add(yourcomponent)
Regards,
Ameet
20 years ago
I have come across date class which gives time in milliseconds..relative to some date and simpledateformat class that changes the way a date is displayed.
But what I am interested is in displaying the system date or time in mm/dd/yy format. How to get system date?
20 years ago
I want to show a warning so that one JTextField should not be left blank. I used the focusLost method of focuslistener. In this method i used JOptionPane.showMessageDialog(this, "do not leave blank", "Blank", JOptionPane.INFORMATION_MESSAGE). I got this message box as I leave that text field (when it is blank). However, I do not know how to get rid of this message. Kindly advice. Also note that focusLost() method is void and cannot return any integers.
20 years ago