Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-23-2008, 05:15 PM
Member
 
Join Date: Apr 2008
Posts: 1
SHAshank1 is on a distinguished road
need to add text field on existing dialog
we have api which has JOption Pane like below

this is in api call

return (String)RSSJOptionPane.showInputDialog(SwingUtilit ies.getRoot(this),
"Select the pool name to apply:",
"Select MPN Pool Name", JOptionPane.PLAIN_MESSAGE, null, options, options[0]);

this is code for showInputDialog:

public static Object showInputDialog(Component parentComponent, Object message, String title, int messageType,
Icon icon, Object[] selectionValues, Object initialSelectionValue) throws HeadlessException {
RSSJOptionPane pane = new RSSJOptionPane(message, messageType, OK_CANCEL_OPTION, icon, null, null);

pane.setWantsInput(true);
pane.setSelectionValues(selectionValues);
pane.setInitialSelectionValue(initialSelectionValu e);
pane.setComponentOrientation(((parentComponent == null) ? getMyRootFrame() : parentComponent)
.getComponentOrientation());

int style = styleFromMessageType(messageType);
JDialog dialog = pane.createDialog(parentComponent, title, style);

pane.selectInitialValue();
// SUN HAD THIS DONE BADLY - REMOVED SHOW() AND DISPOSE() - BLOCKING ON VISIBLE
// 2 RAPID BOXES GOT THE SAME VALUE - AND BLOCKING WAS NOT FUNCTIONING CORRECTLY
dialog.setVisible(true);
dialog.toFront();

while (dialog.isVisible()) {
try {
Thread.sleep(100);
} catch (Exception e) {
}
}

Object value = pane.getInputValue();

if (value == UNINITIALIZED_VALUE) {
return null;
}
return value;
}


I need to add one test foeld after option pane and before OK,Cancle button...how do i do that ...
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
get numeric value from a text field Lehane_9 New To Java 2 06-14-2008 05:19 AM
Regarding Text Field adeeb AWT / Swing 1 06-06-2008 01:01 AM
[SOLVED] How to check what type of value entered in text field Renegade85 New To Java 2 04-28-2008 12:26 PM
Waste Space & Text Field Gajesh Tripathi AWT / Swing 2 12-01-2007 09:44 AM
Applet, To center text and To open I engage in a dialog in an Applet Marcus Java Applets 4 06-08-2007 08:15 AM


All times are GMT +3. The time now is 08:00 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org