The Artima Developer Community
Sponsored Link

Java Answers Forum
Popup

6 replies on 1 page. Most recent reply: Oct 12, 2003 1:09 AM by FredrikN

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 6 replies on 1 page
Kevin

Posts: 27
Nickname: quasi
Registered: Apr, 2003

Popup Posted: Oct 8, 2003 10:12 PM
Reply to this message Reply
Advertisement
How do I get a textarea or textpane or something similar to that to popup. I need to display like a list of events.
Thanx for any help


FredrikN

Posts: 22
Nickname: fredrikn
Registered: Jul, 2003

Re: Popup Posted: Oct 8, 2003 10:33 PM
Reply to this message Reply
You can try the JOptionPane.

http://java.sun.com/j2se/1.4.1/docs/api/javax/swing/JOptionPane.html

Works like a charm.

Kevin

Posts: 27
Nickname: quasi
Registered: Apr, 2003

Re: Popup Posted: Oct 10, 2003 4:13 AM
Reply to this message Reply
Not really what i'm looking for. I need to display a lot of text.

FredrikN

Posts: 22
Nickname: fredrikn
Registered: Jul, 2003

Re: Popup Posted: Oct 10, 2003 9:07 AM
Reply to this message Reply
More text than this ?

http://www.thegate.nu/tmp/JOptionPaneBig.jpg

Or so, you can create an JFrame and set is visible and view it as a 'PopUp'

FredrikN

Posts: 22
Nickname: fredrikn
Registered: Jul, 2003

Re: Popup Posted: Oct 10, 2003 10:32 AM
Reply to this message Reply
Or with the JFrame exemple and a scroll.

http://www.thegate.nu/tmp/POPUpWithJFrame.jpg

Something like this will do


JTextArea textArea = new JTextArea(20,30);
JScrollPane scroll = new JScrollPane(textArea);
yourPanel.add(scroll);

cont.add(scroll);

done..

Write back if you get stuck

Vu Che

Posts: 8
Nickname: bluegreen
Registered: Oct, 2003

Re: Popup Posted: Oct 12, 2003 12:53 AM
Reply to this message Reply
hi Fredrik,
by the way pls. tell me how to create a frame without a title bar.

FredrikN

Posts: 22
Nickname: fredrikn
Registered: Jul, 2003

Re: Popup Posted: Oct 12, 2003 1:09 AM
Reply to this message Reply
You can use the metod setUndecorated like this

myFrame.setUndecorated(true)

Flat View: This topic has 6 replies on 1 page
Topic: Java Hotspot Virtual Machine Previous Topic   Next Topic Topic: package and import

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use