Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AWT textfield behave weird when run using MicroSoft JVM

 
Akhash Ramamurthy
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.



2.jpg
[Thumbnail for 2.jpg]
1.jpg
[Thumbnail for 1.jpg]
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using AWT and MS JVM? Is it possible for you to switch to Swing and the standard Sun JVM?
 
Akhash Ramamurthy
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Akhash Ramamurthy
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic