Solved

Look and Feel on Windows and Solaris

Posted on 1998-11-16
3
270 Views
Last Modified: 2013-12-05
The applet that I developed uses awt components and Symantec components. The Look and feel varies depending on the client OS. On windows NT/95 it looks good. On Unix machines, the text in the Textfield control looks truncated. I have treid with different fonts with no use. On a 14' monitor the vertical and horizontal scroll bar appears. How can I eliminate this.
0
Comment
Question by:ruks
3 Comments
 

Author Comment

by:ruks
ID: 1227546
This is urgent, any suggestions are welcome
0
 
LVL 7

Expert Comment

by:conick
ID: 1227547
do you specify the # of columns in your textfield?
either with setColumns() or in the constructer?
if you dont try explicitly setting those...
so it should behave in the same way on both machines
0
 
LVL 3

Accepted Solution

by:
mjenkins earned 100 total points
ID: 1227548
The easy answer is to use Swing components and the Java (Metal) look and feel. This will require the use of the java plug-in as well, but that gives you assurance that the applet will run anywhere.

Alternatively, you can try to fiddle with the AWT controls. One way to get the textfield components to size appropriately is to initialize the textfield with all W's. For example, if you have a textfiled that is supposedto be 5 chars wide initialize it to "WWWWW" and then reset it to "     " after the layout has been called. 'W' is generally the widest chatacter in a variable font set.

I hope this helps.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This video teaches viewers about errors in exception handling.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now