473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to coustomise JOptionPane

35
hi,

I was wondering if i can customise a JOptionPane ???
ex : A JOptionPane by default has a background color gray............. can i change it ?? can i put some images in the background ?

Its necessary coz............in my game i cant afford having a JOptionPane tht looks sad .........I want to be catchy !!!


kind regards,
Malavika
Oct 22 '07 #1
5 4526
r035198x
13,262 8TB
hi,

I was wondering if i can customise a JOptionPane ???
ex : A JOptionPane by default has a background color gray............. can i change it ?? can i put some images in the background ?

Its necessary coz............in my game i cant afford having a JOptionPane tht looks sad .........I want to be catchy !!!


kind regards,
Malavika
Apart from JOptionPanes you can also use JFrames and JDialogs ...
Oct 22 '07 #2
Ramola
35
Apart from JOptionPanes you can also use JFrames and JDialogs ...
so does tht mean " I cant customize JOptionPanes ".............

kind regards ,
Malavika
Oct 22 '07 #3
r035198x
13,262 8TB
so does tht mean " I cant customize JOptionPanes ".............

kind regards ,
Malavika
Read the API specs for it to see how much you can do with them.
Oct 22 '07 #4
Ramola
35
Read the API specs for it to see how much you can do with them.
thanks alot !
will let u know the development ! :)

Apart from tht ( r035198x ) i was wondering if u could plz.....plz.. look into another thread called ' jmf ' .......

Its a very stupid thing tht i might be missing in ' jmf ' ............if u colud plz pointit out to me !

kind regards,
Malavika
Oct 22 '07 #5
can use
UIManager.put("OptionPane.background",Color.RED);
Aug 23 '13 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: - Steve - | last post by:
Example String testString = "Testing \t tabs"; JOptionPane.showMessageDialog(null, testString, "TEST", JOptionPane.INFORMATION_MESSAGE); Instead of getting the output "Testing tabs", I...
1
by: jazzy | last post by:
Hi, I am new to Java Programming and I am trying to write code using JOption pane to prompt user to type information and then have string output command to display information on the screen. I...
2
by: jek339 | last post by:
Hey, I'm totally new to Java, and I'm taking a class. My current assignment involves inputting 2 names and corresponding bdays for each name using the JOptionPane.showInputDialog etc. Anyway, I'm...
2
by: ragaman123 | last post by:
Hello there, I am designing a battleships game in java and am trying to output to the screen a simple message when a user sinks a ship. I have been trying to use JOptionPane to output a message,...
2
by: majorecono | last post by:
I took a look at the site and found this as a counter. Is there any way I can use it in a dialog box, that asks user to input any number of letters in a (?)dialog box, pressing enter and out comes...
3
by: majorecono | last post by:
What I'm bad at is the dialog box part. This is the code Ive come up with... if you see a way to improve what im thinkng of.... post it please. Program should.... 1. Ask user to type in a...
1
by: Smarteric | last post by:
import javax.swing.JOptionPane; public class MilesPerGallon { public static void main(String args) { String miles; String gallons; double MPG; double miles1, gallons1;
1
by: kamhal | last post by:
is there a way to use this function or any similar function in j#? i have been trying to figure out how to pop a message box in j#. can u help pls?
3
by: heat84 | last post by:
I want to customise JOptionPane and add a KeyListener to it. I want to behave in a certain manner when the enter key is pressed , but from the look of things, the key listener I am adding to the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.