aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes AWT textfield behave weird when run using MicroSoft JVM Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "AWT textfield behave weird when run using MicroSoft JVM" Watch "AWT textfield behave weird when run using MicroSoft JVM" New topic
Author

AWT textfield behave weird when run using MicroSoft JVM

Akhash Ramamurthy
Greenhorn

Joined: Nov 02, 2009
Posts: 25
Hi,

I am facing a weird problem when using MicroSoft JVM to run my Applet. I have an AWT panel with 4 textfields which is added to a dialog box. Everything goes fine until I enter a decimal value into the textfield and close the dialog box. When i reopen the dialog box the textfield inside the panel with all the decimal digits (entered in the previous step) behaves weird. The decimal values along with the WHITE area inside the textfield moves to the left and hides the digits. When I click inside the textfield it becomes normal. The Panel earlier had gridlayout and I even tried changing it to gridbaylayout and still the problem persist.

NOTE: All Development are pertained to JRE1.1 to compatibility with MS JVM

If any can help me with this it would be a great help. Thanks in advance.





[Thumbnail for 2.jpg]

[Thumbnail for 1.jpg]



Software Engg
Akhash
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 9993
    
    7

Why are you using AWT and MS JVM? Is it possible for you to switch to Swing and the standard Sun JVM?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Akhash Ramamurthy
Greenhorn

Joined: Nov 02, 2009
Posts: 25
Maneesh Godbole wrote:Why are you using AWT and MS JVM? Is it possible for you to switch to Swing and the standard Sun JVM?


As it is the requirement we cant switch to Swing. We are using AWT specifically because we want our product to compatible with both Sun and MS JVM.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19556
    
  16

You are using Java 1.1 and Microsoft JVM which are both hopelessly outdated. Java 1.2 has been released in December 1998, over 11 years ago. As for Microsoft JVM,
Wikipedia wrote:Sun Microsystems, the creator of Java, sued Microsoft in October 1997 for incompletely implementing the Java 1.1 standard. [2] In 2001, Microsoft settled the lawsuit with Sun and discontinued its Java implementation.

I doubt that anyone is using Microsoft JVM anymore; It is not included in Windows XP. According to Wikipedia it was added with SP1 but removed again a few months later.

I'd reconsider and drop both the Java 1.1 and Microsoft JVM compatibility requirements; you should move to at least Java 1.4, preferably Java 6.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Akhash Ramamurthy
Greenhorn

Joined: Nov 02, 2009
Posts: 25
I figured out an solution for this problem. Placing the textfield cursor position at 0 (zero) once the "OK" is clicked seems to fix this problem. Here is the code....



Anyways thanks for all your help and efforts.
Akhash
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: AWT textfield behave weird when run using MicroSoft JVM
 
Similar Threads
JComboBox not working properly on a GridBagLayout ??
eliminate case sensativeity
setEditable(true) function of jcombobox not working
component layout not wrapping inside Panel
Align JLabel, JTextField inside TitledBorder