This week's book giveaways are in the Angular and TypeScript and Web Services forums.
We're giving away four copies each of Programming with Types and The Design of Web APIs and have the authors on-line!
See this thread and this one for details.
Win a copy of Programming with Types this week in the Angular and TypeScript forum
or The Design of Web APIs in the Web Services forum!

syed fazal faheem

Greenhorn
+ Follow
since Jul 13, 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 syed fazal faheem

Hi,
There is no need for ur application to extend any class to get the toolkit object. U can get the default toolkit kit by a static method getDefaultToolKit()in java.awt.Toolkit class.
U can check ur screen size with the following piece of code:
import java.awt.*;
public class ScreenSize {
public static void main(String str[])
{
Dimension dim = (Toolkit.getDefaultToolkit()).getScreenSize();
System.out.println("Your screen size is... width: "+ dim.width +" ; height: "+dim.height);
System.exit(0);
}
}
Hope this solves ur problem.
fazal.
18 years ago
Hi,
I guess u have added the table directly to panel. Try adding the table to scrollpane and adding the scrollpane to the panel. Hope this solves ur problem.
fazal
18 years ago
Hi,
As a quick intro, i am developing look and feel implementation for my swing application. I am having a set of internal frames in my application.
When i try to set the button border in UIDefaults, even the minimize, maximize and close buttons of internal frames are getting affected. Can any one help me out with this.
This is the code i used to set the UIDefaults in a class derived from javax.swing.plaf.basic.BasicLookAndFeel
protected void initComponentDefaults(UIDefaults table) {
super.initComponentDefaults(table);
Object[] defaults = {
"Button.font", new FontUIResource("Arial", Font.BOLD, 12 ),
"Button.border",new BorderUIResource(new OvalBorder()),
"Button.margin", new InsetsUIResource(8, 8, 8, 8)
};
table.putDefaults( defaults );
}
OvalBorder class implements javax.swing.border.Border interface

Waiting for a solution,
fazal.
18 years ago
Hi,
There is quite a lot of stuff in here. Thanks guys for all the info. But i still have a problem.
As a quick intro, i am developing look and feel implementation for my swing application. I am having a set of internal frames in my application.
When i try to set the button border in UIDefaults, even the minimize, maximize and close buttons of internal frames are getting affected. Can any one help me out with this.
This is the code i used to set the UIDefaults in a class derived from javax.swing.plaf.basic.BasicLookAndFeel
protected void initComponentDefaults(UIDefaults table) {
super.initComponentDefaults(table);
Object[] defaults = {
"Button.font", new FontUIResource("Arial", Font.BOLD, 12 ),
"Button.border",new BorderUIResource(new OvalBorder()),
"Button.margin", new InsetsUIResource(8, 8, 8, 8)
};
table.putDefaults( defaults );
}
OvalBorder class implements javax.swing.border.Border interface

Waiting for a solution,
fazal.
18 years ago
Hi,
You can convert string into an array of bytes using the following methods in String class:
1. public byte getBytes()[];
2. public void getBytes(int, int, byte[], int);
3. public byte getBytes(java.lang.String)[] throws java.io.UnsupportedEncodingException;

check it out for urself:
just type "javap java.lang.String |more" at the command prompt
bye
fazal.
18 years ago
Hi,
Why dont u try using a document model for the text fields. If u use the same model for both the text fields, changing value in one will reflect in another.
Hope this solves ur problem.
fazal.
18 years ago
Hi there,
I got a similar problem, I have to hide the right part of the split pane. I am having the split pane in a dialog. My dialog size is 500,300. But if i set the divider location to 450 or 500, the divider gets positioned to the left hiding the left part of the pane.But it works fine for 400. But 100 pixels of space is visible at the right. I need to avoid this.
Please help me.
Thanks in advance.
fazal
18 years ago
Hi,
I am using IBM Visual Age for JAVA (Enterprise Edition - version 3.0). I had a problem using javax.swing package bacause Visual Age uses jdk1.1.7 which comes along with it. I solved this by importing (Visual Age - File -> Import) javax.swing package (all packages ang classes inside it) from swingall.jar file. It compiles successfully. But while running it gives the following error:
java.util.MissingResourceException: can't find resource for javax.swing.plaf.basic.resources.basic_en_US
I could not find the above class or resource file in swingall.jar package.
Some one please help me out of this.
Expecting a quick reply, Thanks in advance.
fazal.
[This message has been edited by syed fazal faheem (edited August 07, 2001).]
Hi,
I am using IBM Visual Age for JAVA (Enterprise Edition - version 3.0). I had a problem using javax.swing package bacause Visual Age uses jdk1.1.7 which comes along with it. I solved this by importing (Visual Age - File -> Import) javax.swing package (all packages ang classes inside it) from swingall.jar file. It compiles successfully. But while running it gives the following error:
java.util.MissingResourceException: can't find resource for javax.swing.plaf.basic.resources.basic_en_US
I could not find the above class or resource file in swingall.jar package.
Some one please help me out of this.
Expecting a quick reply, Thanks in advance.
fazal.
[This message has been edited by syed fazal faheem (edited August 07, 2001).]
18 years ago
Hi,
There is no way u can do that. If u are trying to show an existing file name to the user, u can show the file name (may be a text field) and have a upload file( or modify file) link beside it. If the user clicks on this link, it means he wants to upload a different file. so, there is no need to retain the old value. Just open a new window with empty file tag.
Hope this solves ur problem. If u are able to find any other way out, please let me know.
fazal.
[This message has been edited by syed fazal faheem (edited August 07, 2001).]
Hi,
I have got a spin control using this code:
JList list_hour = new JList(new Object[]{"1","2","3","4","5","6","7","8","9","10","11","12"});
list_hour.setVisibleRowCount(1);
panel.add(new JLabel(" hr : "));
panel.add(new JScrollPane(list_hour));
but i dont get the full functionality of spin control.
If i type a number say "5" , then number 5 should be selected on the list.
I know that this can be done by adding a key listener.
I want to know whether there is any other way.
Please give me a sample code if possible.
18 years ago
Hi,
call parentFrame.show() after bringing the internalframe to front.

[This message has been edited by syed fazal faheem (edited July 13, 2001).]
18 years ago