Display an icon(question,warning,etc.) inside JDialog(like in JOptionPane)
Hello,
because JOptionPane can't use a JPasswordField as the input component, I created a JDialog prompting the user for a password. Now I can't figure out how to show that nice look-and-feel style icon inside the dialog (the question mark that is shown when you use messageType=QUESTION_MESSAGE in JOptionPane). Shortly, this is what I have and this is what I want to get... I tried this:
dlg.getRootPane().setWindowDecorationStyle(JRootPane.QUESTION_DIALOG)But it does nothing. Could you help me, please?
Thank you
Ondra
Still it doesn't answer my question: how to display the LAF icon inside a JDialog.Huh?import javax.swing.*;
public class OptionPanePassword {
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new OptionPanePassword().makeUI();
public void makeUI() {
JLabel label =new JLabel("Enter Password: ");
JPasswordField field = new JPasswordField(15);
JPanel panel = new JPanel();
BoxLayout layout = new BoxLayout(panel, BoxLayout.X_AXIS);
panel.setLayout(layout);
panel.add(label);
panel.add(field);
JOptionPane.showConfirmDialog(null, panel, "",
JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
}db
Similar Messages
-
Is it possible to display some ICON in task description?
I am developing workflow, I have created one standard task which has some "description" need display the "ICON" inside, I try to goto the "Insert" -> Charachters -> SAP Icon, but the icon never display as we expected.
Good Morning Everybody,
The above question still continues...
{Please Answer} -
How can I display an icon, instead of text string, as a validation prompt?
My validate method inside my custom validator is like this:
public void validate(FacesContext context, UIComponent component, Object value) {
Pattern datePattern = Pattern.compile("(\\d{2})/(\\d{2})/(\\d{4})");
Matcher dateMatcher = datePattern.matcher((String)value);
if(!dateMatcher.find()){
((UIInput)component).setValid(false);
FacesMessage message = new FacesMessage();
String msg = "[" + value + "] invalid date";
message.setDetail(msg);
context.addMessage(component.getClientId(context), message);
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_FATAL, "xx", "msg");
throw new ValidatorException(facesMsg);
}My JSP has this:
<h:inputText id="test" value="#{projecthandler.test}">
<f:validator validatorId="DateValidator" />
</h:inputText>
<h:message id="testErrorMessage" for="test"/>The <h:message> tag will kick in if the user has invalid data in the <h:inputText> field and clicks submit.
When the page is regenerated, the user will see a text string reflecting what the issue is.
However, instead of this, I would like to display an icon consisting of a red circle with an exclamation point.
The user is supposed to click on the icon if they want more information. By clicking on the icon,
the user will see a message box, with a description of the error.
This is our standard for applications. I'm trying to put together a demo showing how an existing application
would work in JSF, so I won't be able to talk others into using JSF, unless I can get the validation to display an
icon instead of text.
Edited by: Kazan on Mar 18, 2009 9:31 AM
Edited by: Kazan on Mar 18, 2009 9:33 AM
Edited by: Kazan on Mar 18, 2009 9:36 AMOK, I noticed a bug in my validate method. This is updated to fix the bug, and to include the recomendation about background-image:
public void validate(FacesContext context, UIComponent component, Object value) {
System.out.println("DateValidator.test.1");
Pattern datePattern = Pattern.compile("(\\d{2})/(\\d{2})/(\\d{4})");
Matcher dateMatcher = datePattern.matcher((String)value);
System.out.println("DateValidator.test.1");
if(!dateMatcher.find()){
((UIInput)component).setValid(false);
FacesMessage message = new FacesMessage();
String msg = "<span style='background-image: url(/error.gif)'/>";
message.setDetail(msg);
message.setSeverity(FacesMessage.SEVERITY_FATAL);
context.addMessage(component.getClientId(context), message);
throw new ValidatorException(message);
}When I run this, the litteral string of "<span style='background-image: url(/error.gif)'/>" is printed as the message. It does not interpret this as a span tag with an image url.
Can someone tell me what's going on? -
Hi everybody,
I have looked for an answer in this forum ... without any good result.
I worked on a Word 2010 file with some attached pdf files. These attached files are displayed as icons on the word file. If you double click on them, you can consult them. This works very good.
Problem: I would like to convert this word 2010 file into a pdf file, which keeps the icons (linked to attached files) active. If I "pdf" this with my current system, icons are displayed as pictures: I cannot open the attached files.
My question is very simple: is it possible to retain these active icons (= to open attached documents) in a pdf file? Which adobe package should I use?
Many thanks for your help
cheers
elgreengoNo, it's not possible, but I agree it would be a very nice feature.
-
I need to get rid of the second unwanted page which has icons for facebook etc.
I've tried this before so this is the second time. I hope someone will reply. I don't want the second page which appears when I start up firefox. It has icons for facebook etc including Telegraph paper. I didn't ask for this and I don;t want it. A response needs to be in plain English with no computerese - I don't do jargon. (I have no idea what an 'add on' is nor do I know what a 'plug inn' is: have i got some of these unwillingly?
hello johnxxxxzw35, we already received your original question - please don't open new threads for the same topic but please continue at [https://support.mozilla.org/en-US/questions/990532 /questions/990532].
thank you! -
What does a flashing folder icon with a "?" inside mean?
What does a flashing folder icon with a "?" inside mean?
Question (?) Mark, Blinking Folder, or Gray Screen at Startup
These are related but not identical issues. Their causes are outlined in Intel-based Mac- Startup sequence and error codes, symbols. Solutions may be found in:
A flashing question mark or globe appears when you start your Mac
Mac OS X- Gray screen appears during startup
In most cases the problems may be caused by one or more of these:
a. Problem with the computer's PRAM - See Resetting your Mac's PRAM and NVRAM.
b. Boot drive's directory has been corrupted - Repair with Disk Utility.
c. Critical system files are damaged or deleted - Reinstall OS X.
d. The disk drive is physically non-functional - Replace the hard drive.
Note that the information I have provided is what Apple recommends, If other users suggest different solutions than found here, then be sure what they recommend does not impact on your warranty, if any, or ability to get continuing Apple service.
Please don't start removing drives or changing cables unless you know what you are doing and have exhausted other non-invasive alternatives outlined here. If you perform any work yourself that is unapproved by Apple, then you will void any warranty you may have and lose all further Apple Support.
Repair the Hard Drive and Permissions
Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
The main difference if you are using Lion or Mountain Lion is that you must first boot from the Recovery HD. Simply boot from the Recovery HD to perform the above.
Reinstall Snow Leopard Without Erasing The drive
1. Repair the Hard Drive and Permissions
Boot from your Snow Leopard Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
2. Reinstall Snow Leopard
If the drive is OK then quit DU and return to the installer. Proceed with reinstalling OS X. Note that the Snow Leopard installer will not erase your drive or disturb your files. After installing a fresh copy of OS X the installer will move your Home folder, third-party applications, support items, and network preferences into the newly installed system.
Download and install Mac OS X 10.6.8 Update Combo v1.1.
Reinstalling Lion/Mountain Lion Without Erasing The Drive
Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
Reinstall Lion/Mountain Lion: Select Reinstall Lion/Mountain Lion and click on the Continue button.
Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless. -
How to display the icons of apk files in windows explorer
How to display the icons of apk files(android apps) in windows explorer by default in windows 7 and windows 8.1 ?
Believe it or not; The answer is found by searching the internet. One solution is to install an application called BlueStacks player which appears to install an Android VM for playing Android apps. I'm sure there are other solutions, but the
BlueStacks player looks exactly like mu Moto G screen. The apps icons are displayed in Windows Explorer with BlueStacks installed.
http://www.bluestacks.com/app-player.html
I searched the internet for open apk file on pc
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ” -
How do we display .doc files or .pdf files inside flex containers like Panel or Canvas? (i am talking about Flex web browser application and NOT air)
thanks in advance.Perhaps I was not clear...
We have a Word doc.
We want to create a PDF doc from it.
We want, in Word/VBA, to add content (annotation/text note=sticky) to the PDF from Word via VBA macro.
What is the best way to do this?
1. Use a VBA call to the PDF doc to execute the AcroJS (we would pass the content, location, etc for the note in the call) - what is this VBA call that will execute AcroJS in an PDF doc?
2. Use AIC OLE objects to access the PDF doc.
From your last answer - it sounds like I cannot add the annotation to the PDF from the Word VBA macro - is that correct?
Our content is already in the Word doc - We want to execute a macro in Word that will add content to the PDF doc - can this not be done in Word? -
How to display the iconic buttons on the toolbar in oracle 10g forms
hi experts.
i have done all the settings to display the iconic tool bar in the web. the settings i have done are like this.
Initially i have created a .jar file with name my_icons.jar and pasted in /forms/java folder.
1) modified the I:\DevSuiteHome_1\j2ee\DevSuite\application-deployments\forms\formsweb\orion-web.xml file by adding
<virtual-directory virtual-path="/icons" real-path="I:\aptd\icons" />.
2) Modified the forms.conf file by adding the line
AliasMatch ^/forms/icons/(..*) "I:\aptd\icons/$1"
3) Modified the formsweb.config file by
archive_jini=archive_jini=frmall_jinit.jar, my_icons.jar
4) Registry.dat
default.icons.iconpath=icons/
default.icons.iconextension=gif
i did not get the output.
when i run the form through the browser, i could see throught the bottom of the browser that it is taking
http://host:port/forms/java/icons/*.gif
* for diffenent icons name.
but when i run the http://host:port/forms/java/my_icons.jar i could download it.
please suggest the best solution. Its Urgent.thanks a lot sarah. I got it.
but sarah i woild like to know that my real path of the icons is in other drive. but pasting the icons in the oracle/forms/icons will work.
why can't the icons take from the the other drive. And also i have created a jar file. Then why can't it take from the jar file without pasting them in the above mentioned folder.
thanks once agaiin for all. -
To display the output of a FM inside a tree
Hi all,
'REUSE_ALV_POPUP_TO_SELECT' is a FM for displaying or selecting table entries in internal tables in a
popup .
I need to display the output if this FM inside a tree.
That is when i expand the tree , the output of the FM shoul be displayed .
Can you please suggest a demo program for this, or a way in which i can do it?
Regards,
Harshit RungtaNo way You can choose any other ALV.
Kanagaraja L -
To display the icon on the report output
hi friends good afternoon!
iam devloping a report which need to display the icon on the output.
when i press the icon some action will be performed,
this is my requirment plz help.Hi,
First declare INCLUDE ICON in the program Code.
Then you can write the different Icons:
declare a single char field.
move the icons into that and display.
sample code:
form select_icons.
data: w_disp_tab like zpickdisp,
w_disp_head like zpickhead,
w_color like zpickdisp-color,
ov_icon like zpickdisp-ov_icon,
gi_icon like zpickdisp-gi_icon,
to_icon like zpickdisp-to_icon,
lp_icon like zpickdisp-lp_icon,
pc_icon like zpickdisp-pc_icon,
lv_icon like zpickdisp-lv_icon,
vm_icon like zpickdisp-vm_icon,
em_icon like zpickdisp-em_icon,
t_ovst_tab like t_disp_tab with header line.
constants: c_col1(3) value 'C10',
c_col2(3) value 'C20'.
sort t_data_tab by lgtor vbeln.
w_color = c_col2.
loop at t_data_tab.
at new lgtor.
fill ALV header table
clear w_disp_head.
w_disp_head-lgtor = t_data_tab-lgtor.
append w_disp_head to t_disp_head.
endat.
goods issue status & overall amber/green only
case t_data_tab-wbstk.
when c_c.
move icon_green_light to gi_icon.
move icon_green_light to ov_icon.
when others.
move icon_red_light to gi_icon.
move icon_yellow_light to ov_icon.
endcase.
transfer order status
case t_data_tab-lvsta.
when c_a.
move icon_red_light to to_icon.
when c_b.
move icon_yellow_light to to_icon.
when c_c.
move icon_green_light to to_icon.
when space.
write N/A
to_icon = 'N/A'.
endcase.
loaded to pallet status
if not t_data_tab-zpallet_no is initial.
move icon_green_light to lp_icon.
else.
move icon_red_light to lp_icon.
endif.
pallet count status
if not t_data_tab-zcount_check is initial.
move icon_green_light to pc_icon.
else.
move icon_red_light to pc_icon.
endif.
loaded to van status
if not t_data_tab-zvan_no is initial.
move icon_green_light to lv_icon.
else.
move icon_red_light to lv_icon.
endif.
van manifest status
if not t_data_tab-zvan_print is initial.
move icon_green_light to vm_icon.
else.
move icon_red_light to vm_icon.
endif.
end of day manifest status
if not t_data_tab-zeod_print is initial.
move icon_green_light to em_icon.
else.
move icon_red_light to em_icon.
endif.
move working data table to display table
move-corresponding t_data_tab to w_disp_tab.
w_disp_tab-ov_icon = ov_icon.
w_disp_tab-gi_icon = gi_icon.
w_disp_tab-to_icon = to_icon.
w_disp_tab-lp_icon = lp_icon.
w_disp_tab-pc_icon = pc_icon.
w_disp_tab-lv_icon = lv_icon.
w_disp_tab-vm_icon = vm_icon.
w_disp_tab-em_icon = em_icon.
w_disp_tab-color = w_color.
fill N/A values for initial fields for display
if w_disp_tab-packvorschr is initial.
w_disp_tab-packvorschr = 'N/A'.
endif.
if w_disp_tab-exidv is initial.
w_disp_tab-exidv = 'N/A'.
endif.
if w_disp_tab-zpallet_no is initial.
write 'N/A' to w_disp_tab-zpallet_no.
endif.
if w_disp_tab-zvan_no is initial.
write 'N/A' to w_disp_tab-zvan_no.
endif.
display different color for new doc number
at end of vbeln.
if w_color = c_col1.
w_color = c_col2.
elseif w_color = c_col2.
w_color = c_col1.
endif.
endat.
append w_disp_tab to t_disp_tab.
clear w_disp_tab.
endloop.
we have all the icons in display but need to check the overall status
as this refers to the line items
green and amber statuses already set and use the same criteria as the
goods issue status unless detected as red here
data: ov_stat_red(1).
clear w_disp_tab.
sort t_disp_tab by vbeln.
loop at t_disp_tab into w_disp_tab.
at new vbeln.
check all line items for delivery
loop at t_data_tab where vbeln = w_disp_tab-vbeln.
if t_data_tab-lvsta = c_a.
set overall status to red
ov_stat_red = c_yes.
exit.
else.
leave green/amber status icon as previosly determined
endif.
endloop.
if ov_stat_red = c_yes.
set overall status to red for all items in that delivery
clear ov_stat_red.
move icon_red_light to w_disp_tab-ov_icon.
modify t_disp_tab from w_disp_tab transporting ov_icon
where vbeln = w_disp_tab-vbeln.
endif.
endat.
endloop.
endform. " select_icons
Regards,
Anji -
How to display different icon within WDA alv table base on row data ?
Hi,
is that possible to display different icon for every row within ALV table depending on the row data ?
for instance if the status 'S' display ~Icon/SuccessMessage and 'E' display ~Icon/ErrorMessage ?
because base on this code below i only can set 1 icon for the whole row data.
LOOP AT lt_columns ASSIGNING <fs_column>.
CASE <fs_column>-id.
WHEN 'ICO'.
CREATE OBJECT lr_caption.
lr_caption->set_image_source( value = '~Icon/SuccessMessage').
<fs_column>-r_column->set_cell_editor( lr_caption ).
ENDCASE.
ENDLOOP.
Thank you in advance.
FernandHello,
Yes it is possible to display different images based on data.
For that what you can do is create one attribute 'STATUS' of type string in context node which you are mapping to ALV.
And fill that attribute with the path to image based on your requirement like for status 'S' set the attribute to ~Icon/SuccessMessage and if status is 'E', set it to ~Icon/ErrorMessage at runtime.
Now in the settings for ALV use the following code:
* Display icon in column seatsocc
DATA: lr_column TYPE REF TO cl_salv_wd_column,
lr_image TYPE REF TO cl_salv_wd_uie_image,
lv_icon TYPE string.
lr_column = lv_model->if_salv_wd_column_settings~get_column( 'SEATSOCC' ).
CREATE OBJECT lr_image.
lr_image->SET_SOURCE_FIELDNAME( 'STATUS' ).
lr_column->set_cell_editor( lr_image ).
in the above code, column 'SEATSOCC' will be displayed as an icon.
Sample code to fill the attribute 'STATUS'
LOOP AT lt_flights INTO ls_flight.
lv_seatsfree = ls_flight-seatsmax - ls_flight-seatsocc.
IF lv_seatsfree = 0.
ls_flight-status = 'ICON_RED_LIGHT'.
ELSEIF lv_seatsfree <= 50.
ls_flight-status = 'ICON_YELLOW_LIGHT'.
ELSE.
ls_flight-status = 'ICON_GREEN_LIGHT'.
ENDIF.
MODIFY lt_flights FROM ls_flight.
ENDLOOP.
Hope this helps!
Regards,
Srilatha
Edited by: Srilatha M on Jun 25, 2010 12:02 PM -
My ipod displays an icon of a cable and the itunes logo but when plugged in, my mac says that it can not verify my device. I have a backup saved on my mac but it won't let me open it up or sync my ipod with my mac.
Hi crcascio17,
Thanks for visiting Apple Support Communities.
You may want to try some of the suggestions in this article:
iPod not recognized in iTunes and Mac desktop
http://support.apple.com/kb/ts1410
Best Regards,
Jeremy -
Have CS 5 Installed on my iMac and works ok. But installed on my new MacBook Pro it won't open NEF files from my Nikon D810. Displays NEF icons, but when I try and open them the response is: Make sure latest RAW updates are installed. If problem persists follow link: http://www.adobe.com/go/kb407111. Have installed Bridge 5.0.2.4; Raw Ref Version 7.0.0.308; DNG converter_8_7_1.dmg; Bridge 5.0.2 Update 2. Also same problem with Lightroom which I don't normally use. Lightroom_3_LS11_mac_3_6.dmg installed.
In the link you posted it states that the Nikon 810 requires ACR 8.6 or newer.
Version of ACR are specific to versions of Photoshop. You cannot use 8.6 nor even 7.0.in CS5.
I believe that ACR 6.7 is the latest that will work with CS5, so make sure you have this installed and get rid of ACR 7.
Having 2 versions of ACR will cause problems.
You have already downloaded DNG Converter 8.7.1.
Have you double clicked the DMG file to allow you to install DNG Converter on your computer?
Be aware that DNG converter is a stand-along application and not a plug-in.
You need to open DNG converter at select the FOLDER that contain your .NEF files.
Don't open the folder and try to select individual files, it doesn't work that way.
After converting your D810 files to DNGs you can then open the DNGs in CS5
The problem is your camera didn't exist when CS5 & its version of ACR was developed.
i don't use Lightroom, but the list mentions Lightroom 5.6 as needed to open D819 so your 3.6 version of LR won't cut it. -
Pictures not displaying as icons in picture folders
When I open my picture folder while in Finder, some of the nested folders will show previews of the photos as icons, while other folders only show the generic "jpeg" icon. Does anyone know why? My goal is to have the pictures themselves be displayed. Thanks!
Actually, I think the problem is the View setting for the nested folders. Check it and make sure the sub-folder has the option set to display an icon preview. Also, there are different setting options for each type of "view"--and folders can vary in their individual settings. Frankly, I believe the system for setting the view options is confusing and less useful than it used to be, but Apple likes the way it works now, and no one asked me.....
Francine
Francine
Schwieder
Maybe you are looking for
-
This has happened many times, in fact, every time I've clicked on a link in an email -- but just since Sunday, I think. Before that, it worked perfectly.
-
I have PS CS5 and LR on my iMac- How do I install it also on my Macbook Pro?
I have CS5 and LR on my iMac but need to install them also on my new Macbook Pro. I have the original disks and serial numbers, but do not have a CD rom drive on the Macbook. Is there a way to download them just using the serial numbers without hav
-
Anyone know of a hard perspex keyboard cover?
Hi I have something very specific in mind, and I'm trying to find out if it exists and can be bought. I have a G5 with a standard Apple keyboard, and my wife and I have it running, doing various tasks, pretty much 24/7, whether we're at the computer
-
Premiere Pro CC2014 Playback issues, Render issues, Serious Error issues
Here's my problem. Premiere Pro CC worked amazing. Never had any issues with playback, rendering - nothing. However, CC 2014 appears to be quite different. Yesterday I literally had to restart Premiere every 20 minutes! Out of no where video playbac
-
Hi all, I'm trying to make a report using BI publisher. I need to have one parameter(Data Type: String). When you enter the text I want to display information for all records that have this string. I need the functionality of '% search'. It means tha