Tzu ng
Tzu ng

Reputation: 9244

Draw a simple textbox in java?

I want to create a simple textbox like in the picture in java. It displays a short text and close after a short time or we can click close button. Thanks first :)

image

Upvotes: 0

Views: 681

Answers (3)

Tzu ng
Tzu ng

Reputation: 9244

I've just resolved my problem using a simple JLabel and I use timer running in other thread to close it. Thanks guys :)

Upvotes: 0

Andrew Thompson
Andrew Thompson

Reputation: 168825

..a short text and close after a short time ..

Tool tip

..or we can click close button.

JTextArea or JEditorPane in JDialog (possibly also adding a javax.swing.Timer to close it).

Upvotes: 2

Kevin
Kevin

Reputation: 4128

Use a glass pane to paint over other content.

http://download.oracle.com/javase/tutorial/uiswing/components/rootpane.html

Upvotes: -1

Related Questions