How can I customize a jDialog
Hi,
I have implemented a silly game. To display who is the winner I have tried JOptionPane but the program freezes instead. Thus I thought to customize my own dialog so the user, togheter with the message, could also choose whether run the game again or exit. Could anyone post a link where I could look up the above issue, please?
Regards
refer api docs for detailed explanation
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JOptionPane.html#showOptionDialog
(java.awt.Component,%20java.lang.Object,%20java.lang.String,%20int,%20int,%20javax.swing.Icon,%20java.lang.Object[],%20java.lang.Object)
for just yes/no, you are better off using showConfirmDialog().
one problem you may encounter with your current code is the comparison to YES_OPTION.
the return value from showOptionDialog is the button number associated with
its index in the array. it works in the example because YES_OPTION is 0,
and the option "yes" is at 0. Make your array like this (swap them)
Object[] options = {"No","Yes"};now press 'Yes' and see if you get the same result.
in a confirmDialog, the 'Yes' button will always return YES_OPTION.
Similar Messages
-
How can I customize my terminal?[SOLVED]
I'm using xterm and /bin/zsh, but it looks ugly. It's a white background with a black text. On debian, I use to right click and hit preferences and went from there. But when I right click it just highlights the shell. How can I customize background color, change font, etc?
http://dwv91.deviantart.com/art/Twily-L … -426541695 How can I get my terminal to look like this? I know the color codes, but I don't know how to actually get there!
Last edited by BabbyUser (2014-08-28 18:14:20)He/she lists everything they are using right under the screenshot:
Much of the same from my other submission...
Arch Linux with Awesome WM and custom tile layout. Also using Compton for composition.
Firefox Nightly (Australis) [v31.0a1] and 4-Chan with my CSS. Using Vimperator for navigation.
(Firefox CSS can also place an url-bar on top (below the tabs or merged with the tabs on the left) or at the bottom of the browser)
Terminals (URxvt-256color) showing from left: screenfetch and ncmpcpp + mpd.
My files can be found at twily.info (files updated for this theme May 17th, 2014)
The Lemon font and my vol/bat widgets belong to github.com/phallus.
Wallpaper: http://wallbase.cc/wallpaper/2…
If I was you, I would go through each thing listed and figure out each one. Understanding each element is essential. -
How can i customize portal's Approval Detail Page?
Hi there,
I wonder how can i customize the portal Approval Detail Page? I got to know tat the package script is wrapped and cannot be unwrapped. So I am thinking to add smth like a link in the page for the mailto function. I was asked to send an email notification to the top management whenever there's smth new added approved.
where can i locate the page? or... where's the script to generate the page? Can someone suggest me?
thank you for your patient wit my question..In SP3 you can get a DesktopBackingContext, from which you can get the desktop's definitionLabel or title. Perhaps that will work for you?
-
How can i customize flash player to open frames in new windows ??
how can i customize flash player to open frames in new windows ??
In case you haven't solved this, this document might help:
http://helpx.adobe.com/flash-player/kb/create-pop-browser-windows-flash.html -
How can we Customize output of "PO Output for Communication" Program?
How can We Customize Format of the output of "PO Output for Communication" Program.
Executable is "POXPOPDF" Execution File name is "PoGenerateDocumentCP" which is a java program.
"PO Output for Communication Program" is used to generate DRAFT PO details in pdf Format to go with Workflow Notification for PO Approval.
Regards,
Muhammad UsmanInfact we need to Change Format/data of the pdf file wich comes with Workflow Notification PO "Response Required for PO Approval".
I the pdf file attached is generated by "PO Output for Communication" Concurrent Program.
Executable is "POXPOPDF" Execution File name is "PoGenerateDocumentCP" which is a java program.
This prgram uses the following files to generate pdf output of draft PO output.
DATA FILE:
PO_STANDARD_PO.xml
PO_STANDARD_PO.xsd
TEMPLATE:
PO_STANDARD_XSLFO.xsl
I need to know any visual layout editor available to change contents/layout/data of this pdf.
Regards,
Usman
Edited by: user10518960 on 01-Feb-2013 07:18 -
How can i customize ringtones Galaxy stellar ???
i downloaded some music and i am using a song as a ringtone, the ringtone starts with the beginning of the song ( of course ) how can i customize it so it will start towards the middle ... i can not figure it out
Get an app that allows you to edit the ringtone. Such as Ringtone Maker, Ringdroid.......
-
How can I customize af:query and af:queryCriteria
Dear all,
I have a question,How can I customize <af:query> and <af:queryCriteria/>, for example change "search" button label to "find" ,
Best regards,These changes must be made within the application skin.
--RiC -
How can I customize the skin of my AIR app
Hi all,
I have created an AIR app from my RoboHelp v7 WebHelp.
Works and looks quite nice. Great. It's just that it did not use the WebHelp skin I created. It uses some default skin.
How can I customize the skin of my AIR app? When I run the RH Packager for Adobe AIR, I get a dlg box come up, called, "General Options - RoboHelp Packager for Adobe AIR" and it offers me a few default skins, but it does not offer me the skin I made for my WebHelp.
I also heard that if you learn FLEX you might be able to change the skins.
TIA
aviHeya,
In order to change it alle just set it up as ordinary html webpage so heres and example of css:
style.css - In the main directory of your app.
body {
margin:0;
padding:0;
#wrap {
margin:0;
padding:0;
text-aling:left;
#header {
padding:2px;
background:#000;
color:#fff;
#content {
padding:1em;
margin:0;
background:#ccc;
#footer {
padding:2px;
background:#000;
color:#fff;
Now for the html file:
<html>
<head>
<title>My App</title>
<link href="style.css" rel="stylesheet" media="screen" />
// Scripts go here
</head>
<body>
<div id="wrap">
<div id="header">
My Application title
</div>
<div id="content">
bla bla bla lorem lipsum.
</div>
<div id="footer">
Copyright'n stuff
</div>
</div>
</body>
</html>
If you need more help or examples I recomend that you go here and read some stuff on a lot of it all , you can also download theese samples it contains a lot of good stuff which makes it all A LOT easier to understand, the way I learnt most of what I know even though I am still missing some things.
Hope it helped!
Best Regards
Buch -
How can I customize my guide sounds etc?
When l'm working in my Adobe illustrator SC5.1 artboard and l snap anything to a grid or guide I like to here it. How can I customize these sounds?
Thanx !Thank you Larry for trying!! ...V
PS: I work on an iMac and it doesn't have this feature either -
How can I customize Workflow for Organizational Change (WS01000014)
Hi ti all!
Let me know please, How can I customize Workflow for Organizational Change (WS01000014)?
What steps must I do?
Thank!Oracle Workflow home page is basically static HTML content rendered by Mod PLSQL code written in WFA_HTML.HOME procedure. There is no supported way of customizing this page.
Thanks -
How can I customize my status bar to change the color?
Hello:
How can I customize my status bar to change the color?
ThanksOn which phone model? Either way, modifying the notification bar text color usually isn't something you can do with a standard stock phone.
-
How can i customize GPA round up / down
Can somebody help me how to customize GPA round up / down.
for example i got a 3.576 GPA
system automatically display 3.58
but if i want 3.57 how can i customize.
regards,
jin dalJin dal,
You can use BADI 'HRPIQ00SI2_PINDX_CAL' to customize GPA round up / down.
Prabhat Singh -
How can i customize advertisementplugin of osmf
I am using strobe media playback player.
How can i customize advertisementplugin of osmf because i want to hide control bar while video ads are playing and show control bar while main video is playing.Hi Avi
Yep, that's what you get with AIR output. You have to live
with the skins the AIR layout provides. I suppose if you are a FLEX
developer you might be able to change the skins. But it is what it
is.
You might consider submitting a Wish Form to ask the
development team to allow us more flexibility with AIR skins. Or to
even create a way for the AIR app to use elements of the WebHelp
skins.
Click
here to visit the Wish Form.
Cheers... Rick -
How can I customize my report by Teststand
How can I customize my report by Teststand
TestStand by itself does not provide a reporting mechanism which can deliver a report as shown in your screenshot.
I see three options for you to proceed:
1.) Analyze the options you have with the default TestStand reporting (e.g. XML with style sheet). Consider if you really require the report layout and file format (docx) shown in your screenshot or if XML/HTML or ASCII text will also work. Play around with the report options until it works for you. This would be the simplest solution.
2.) Log report data into a database and create an additional software package to retrieve data from there and display it as the required report.
3.) Exchange the TestStand reporting mechanism with a complete self written version to create docx-files with the required layout. This will be the most complex approach except you are familiar with the TS API, but don't know anything about databases....
When following either option 2 or 3, you can
a) try yourself as developer
b) search for an integration partner implementing that stuff for you. When following option 3), i recommend you to search for an NI Alliance Member with TestStand knowledge.
hope this helps,
Norbert
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it. -
how can I customize each content page separately, so that if I change one chapter, it won't affect the next?
I don't think you can do what you want to do, sorry.
See: Publishing With iBooks Author
http://shop.oreilly.com/product/0636920025597.do
Maybe you are looking for
-
Multiple devices, one account
Is it legal to purchase an app and put it on more than one device with the same account? If so, is there a way to transfer an app from an iphone to an ipod touch when there is no wifi to connect the ipod touch to the internet/app store? Thanks!
-
someone stole my friend's Iphone4s today, and I want to know if it can be traced if the person took out the SIM card and restored it. I also want to know if her service provider can block the phone from use if there is no SIM in there and it is resto
-
International Wikis (2010 edition)
So, there were some discussion about how to handle internationalization in the past. Some things have changed and we have a lot more experience. So I think it's worth to review the situation and our plans. We finally have a simple but well working in
-
How does the newest Iphone work with Ford Sync?
How does the new Iphone work with Ford Sync? I was thinking of purchasing the 4s but may go elsewhere if there is a better phone for the equipment in my vehicle.
-
Firefox 31.0 google old search engine :(
i had to format my computer , after that i downloaded FF , and when searching in google i see the OLD engine , not the new 1 , how thats possible?