Jump to content
  • Advertisement
Sign in to follow this  
someboddy

[java] AWT text display problem

This topic is 4958 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have written this simple code:
import java.awt.*;
public class MyClass
{
	public static void main(String[] args)
	{
		Frame f=new Frame("My Frame");
		Label l=new Label("abc123a-c.d");
		f.add(l);
		f.setSize(100,100);
		f.setVisible(true);
	}
}
and compiled it. When I ran it, this was the result. As you can see, the numbers and special sings have been lifted half a row... Or maby the letters have been lowered half a row. It all depends how you look at it. Anyways, can someone tell me how to solve this problem?

Share this post


Link to post
Share on other sites
Advertisement
The same code did not reproduce the behavior in my machine. I'm using SDK 1.5, update 3.

It is something with the SDK you're using, or your own machine's appearance settings, IMHO.

Son Of Cain

Share this post


Link to post
Share on other sites
It didn't occur with me neither. It might be the SDK as pointed out. Otherwise try
- making the label larger; perhaps it goes fubar because of too narrow constraints
- check out which font is used -- maybe it depends on your default windows/gui/swing font which is different on our pcs

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!