How to set font for title and message in JOptionPane?
Hi,
I have following test code.
JOptionPane.showMessageDialog(null, "Some Alert Message", "Alert", JOptionPane.ERROR_MESSAGE);In this code can we set font for "Some Alert Message", "Alert"?
Regards,
Kalyani......
roll-your-own?
import javax.swing.*;
class Testing
public static void main(String[] args)
JDialog.setDefaultLookAndFeelDecorated(true);
JOptionPane optionPane = new JOptionPane("<html><font size='5'>Your message here</font></html>");
optionPane.setOptionType(JOptionPane.DEFAULT_OPTION);
optionPane.setMessageType(JOptionPane.ERROR_MESSAGE);
JDialog dialog = optionPane.createDialog(null, "Alert");
dialog.getLayeredPane().getComponent(1).setFont(dialog.getFont().deriveFont(18f));//size = 18/whatever
dialog.setModal(true);
dialog.setVisible(true);
}
Similar Messages
-
How to set value for trim and bleed using jsx script?
I have tried using bleedoffsetRect but somehow it is not working. Can anybody please help me on how to set value for trim and bleed using jsx script? Any example will be highly appreciated.
Following is the code I am trying with:
var _saveName = new File ( root_path +_strFileName+".pdf");
var _saveOpts = new PDFSaveOptions();
_saveOpts.printerResolution = 300;
var bleedarray = new Array();
bleedarray[0] =9.00;
bleedarray[1]=9.00;
bleedarray[2]=9.00;
bleedarray[3]=9.00;
_saveOpts.bleedOffsetRect = bleedarray;I would expect although I've not actually tried this for the bleed off set box to be larger than the artbaord and the first two values to be negative or 0…
var bleedarray = new Array(-9,-9,artboard.width+9,artboard.height+9);
Where 'artboard.width' & 'artboard.height' you will have calculated from your file. An Array(9,9,9,9); would not constitute any boxes bounds. -
How to set font for JOptionPane.showMessageDialog() ?
Hi,
I want to set font for JOptionPane.showMessageDialog(). I have tried with following but it did not worked.
javax.swing.UIManager.put("JOptionPane.font", "Verdana"); Do any one have idea how to do this. Your suggestion would be helpfull to me.
Thank you.Then you'll have to loop over the components in the JOptionPane and setFont for each JButton. My SwingUtils class (search the net using Darryl SwingUtils, I can't give you a link as it's blocked from my office) can make this easier.
Sample code:import darrylbu.util.SwingUtils;
import java.awt.Font;
import javax.swing.*;
import javax.swing.plaf.FontUIResource;
public class OptionPaneFonts {
public static void main(String[] args) {
UIManager.put("OptionPane.messageFont", new FontUIResource(new Font(
"Verdana", Font.BOLD, 32)));
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
new OptionPaneFonts().makeUI();
public void makeUI() {
JOptionPane pane = new JOptionPane("So it's a date?",
JOptionPane.QUESTION_MESSAGE,
JOptionPane.YES_NO_CANCEL_OPTION,
UIManager.getIcon("OptionPane.questionIcon"),
new String[]{"Okey-dokey", "Not on your life!",
"Let me think about it"
}, null);
for (JButton button : SwingUtils.getDescendantsOfType(JButton.class, pane)) {
button.setFont(new Font("Tahoma", Font.ITALIC, 18));
JDialog dialog = new JDialog((JWindow) null);
dialog.setModal(true);
dialog.add(pane);
dialog.pack();
dialog.setLocationRelativeTo(null);
dialog.setVisible(true);
}db
Edited by: DarrylBurke -- shortened the code -
How to set ORACLE_HOME for database and apps server in same server
Hi, I have problem here to set ORACLE_HOME in .bash_profile for database and apps server. please help me to set this Oracle Home.
Thanks
-jebatcoIf you mean to have both simultaneosly set on the same OS session, of course that's not possible. But you can configure them on your profile, and choose them when needed. The following is an excerpt from my .bash_profile
export EDITOR=vi
umask 022
alias O='cd ${ORACLE_HOME}'
o10()
{ export ORACLE_SID=db102
export ORACLE_BASE=/home/oracle/base
export ORACLE_HOME=$ORACLE_BASE/OraHome10
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
export TNS_ADMIN=$ORACLE_BASE/OraHome11/network/admin
export PS1='[\u@\h_10 \W]\$ '
o11()
{ export ORACLE_SID=db11
export ORACLE_BASE=/home/oracle/base
export ORACLE_HOME=$ORACLE_BASE/OraHome11
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
export PS1='[\u@\h_11 \W]\$ '
xe()
{ export ORACLE_SID=XE
export ORACLE_BASE=/usr/lib/oracle/xe/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/server
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
export TNS_ADMIN=/home/oracle/base/OraHome11/network/admin
export PS1='[\u@\h_XE \W]\$ '
}If I want to set Oracle 10g environment I type "o10" at OS prompt, "o11" for 11g, and so on. -
How to set RNA for Agent and Preference
How best to set the number of rings for a Verison 8 UCCX Agent, before the system moves on to the next agent?
Line preference - we want when they pick up the handset for outgoing that it select the IPCC extension. This is a CUCM setting or a UCCX setting?The RONA timer is controlled by the Connect parameter of thebSelect Resource step in the script.
The phone will answer whichever DN is on button one (upper most).
Please remember to rate helpful responses and identify helpful or correct answers. -
How to set View for Completed items inside Tasks?
How to set button for 'View' and see Completed items or not completed inside Tasks?
Hi,
You want to set custom views for Tasks folder so that when we click a view button, it will show all Completed or incomplete tasks, am I correct?
Which version of Outlook are you using? There are existing views for completed/incomplete tasks in Outlook. In Outlook 2010 and Outlook 2013, we can find the buttons under View tab > Change View. Click Completed button to view all completed
tasks; Click Active button to view incomplete tasks.
In Outlook 2007, just click View > Current View to switch between different views.
If I've misunderstood something, please feel free to let me know.
Regards,
Steve Fan
TechNet Community Support
It's recommended to download and install
Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
programs.
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
[email protected] -
My husband and I share an iTunes account. We both just got iPads. How can we program them to have different phone numbers for FaceTime and messages
Use different email address (gmail?) just for FaceTime and Messages.
Using FaceTime http://support.apple.com/kb/ht4319
Troubleshooting FaceTime http://support.apple.com/kb/TS3367
The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
http://tinyurl.com/a7odey8
Troubleshooting FaceTime and iMessage activation
http://support.apple.com/kb/TS4268
Using FaceTime and iMessage behind a firewall
http://support.apple.com/kb/HT4245
iOS: About Messages
http://support.apple.com/kb/HT3529
Set up iMessage
http://www.apple.com/ca/ios/messages/
Troubleshooting Messages
http://support.apple.com/kb/TS2755
Setting Up Multiple iOS Devices for iMessage and Facetime
http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
FaceTime and iMessage not accepting Apple ID password
http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
Unable to use FaceTime and iMessage with my apple ID
https://discussions.apple.com/thread/4649373?tstart=90
For non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
Cheers, Tom -
How to set password for a zip file and should be checked when reading that
Hi friends,
how to set password for a zip file and should be checked when reading that file???
thanks.
Praveen Reddy.JHeyy man, i think, u did not get my problem.
all i have to do is:
i have to create a zip file, and we should secure it with password when creating. and whenever the user wants to open that zip file he should provide correct passowrd otherwise he could not read that file. So, we should check for that also.
Tanks for reply. -
How to set a minimum width and height for a stage or scene?
Hello,
Does anyone how to set a minimum width and height for a stage or scene?
I tried listening for width/height property value changes and then adjust the width/height if necessary, but that causes unpleasant flickering of the window.
In JavaFX 2.1 beta SDK for Mac OS, the Stage class has setMinWidth() and setMinHeight() functions which work very well.
I'm wondering what's the equivalent way to do that when using the FX SDK for Windows.
Any help is appreciated!
Thanks.I was wondering how to enforce a minimum stage size with JavaFX 2.0.3.The same flickering way you are currently doing it. See: http://javafx-jira.kenai.com/browse/RT-15200 "Need a way to set the minimum size of a window"
-
How do I set a default title and text style on Quick?
On Adobe Premiere Essentials 13 video editing, if I use Quick is it possible to set a default style for titles and text? I see instructions for setting a default style in Expert, but that doesn't seem to work in Quick. Thanks.
aperture14
What is this Premiere Elements Essentials 13? I know the program only as Adobe Premiere Elements 13 for Windows or Adobe Premiere Elements 13 for Mac. On what computer operating system is it running and is it a pre-installed program from the computer manufacturer?
So, if you have some modified version of Premiere Elements 13 Windows or Mac, I cannot give you a yes or no answer to
if I use Quick is it possible to set a default style for titles and text?
In Adobe Premiere Elements 13 Windows (assumed Mac also), there should be no problem in creating a text title in the Quick workspace and saving a particular text style and setting that created text style to the default. Are you OK with doing that in the Expert workspace if not the Quick workspace?
Please give us more details of your situation so that we can customize a reply for you.
Thank you.
ATR -
Is there any way to change the default font for outgoing text-messages, in "Messages"?
I can change it for one conversation, but then it resets to the default, tiny font.
The preferences menu only lets me change the conversation font.
(OSX 10.10)Hi,
As you may remember there used to be a Messages pane to the Preferences where the Font and colour of the Balloons or background and the Font text colour could be changed.
And there was a Format Menu for character, word and Sentence changes in the current IM or iMessage.
Those have gone in Yosemite's version of Messages (Despite it retaining the designation of Messages 8 the same as Mavericks' version).
All that can be done now is set the size of the font and this has been moved to the General Section of the Preferences.
The Yosemite version has also been fixed to using the Balloons style of send and receiving any type of messages as well.
Changing the Font would involved editing the Balloon.transcript file.
10:34 pm Saturday; December 13, 2014
iMac 2.5Ghz i5 2011 (Mavericks 10.9)
G4/1GhzDual MDD (Leopard 10.5.8)
MacBookPro 2Gb (Snow Leopard 10.6.8)
Mac OS X (10.6.8),
Couple of iPhones and an iPad -
How to set password for BPEL domain
Hi,
I am new to SOA.
I want to setup client-server environment for few developers.
I installed SOA 10.1.3.3 in the server machine.
And I created few domains in BPEL, one for each developer.
It didn't ask me to set the password while creation of the domain.
Please let me know how to set password for newly created domain so that each developer login to his/her own domain and manage processes.
Thanks!!!Thanks for the prompt response.
What roles should I give to my developers to allow them to manage their services in ESB control, BPEL control, WSM control.
And I would like to know how to set the password for a BPEL domain too.
Message was edited by:
user644377 -
Trying to find out how to edit artwork, keywords, titles, and descriptions
Trying to find out how to edit artwork, keywords, titles, and descriptions for my own video podcast that I have created for the iTunes store. My podcast shows on the first page in the itunes store (podcasts) for "forex" "forex training" and "forex education" under the name "fastpips", however I can't seem to find out how to change the title, for each podcast, the description, and keywords. I also want to add artwork to my podcast. I know how to do it under options for my own iTunes on my personal computer, but don't know how to edit it for others to see in the store itself. Thanks so much for any advice. By the way, I upload all my video podcasts to iTunes via ScreenCast.com I'm not sure if this will help, but here is the domain for the screencast files: http://www.screencast.com/users/ForexProFund/folders/FastPips.com%20Forex%20Trad ing%20and%20Forex%20Education
I have a similar question, I would like to edit the artwork for EACH episode in the podcast, as well as have one artwork for the entire podcast series. Any suggestions? This is a podcast that I've created -- I did the same thing for a TV Show where I was able to do custom artwork for each episode, but not one single artwork for the entire series. Does anyone have suggestions of how i should proceed?
Recap:
One image for entire Podcast Series (or TV show)
Different Set of Images for each episode in Podcast. (Understand how to do this in TV show)
Thanks! -
How to set acknowledgement flag in asynchronous message
Hello,
I just read in the documenation that it is possible to request acknowlegment messages by setting an "acknowledgement tag" in the request message.
My question now is how to set this acknowledgement tag and which rules I have to follow? Do you have any more information on this topic? I see the flags in "ReliableMessaging" but not sure how to set them.
Thank you.
Edited by: Florian Guppenberger on Dec 2, 2009 5:16 PMHi,
For idoc check this links
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f6d2d790-0201-0010-9382-b50b499b3fbe
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f6d2d790-0201-0010-9382-b50b499b3fbe
I don't think it is possible for Proxy.
Regards
Ramesh -
How to set a Caption/title in ALv
Hi frnds,
Can you tell me how to set a caption/title to a ALV grid.
Regards
Anujhi
try like this
DATA: i_title_kna1 TYPE lvc_title VALUE 'FIRST LIST DISPLAYED',
i_title_vbak TYPE lvc_title VALUE 'SECOND LIST DISPLAYED'.
populate additional paramete as follows.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_pf_status_set = 'PF_STATUS_SET'
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP-OF-PAGE'
i_grid_title = i_title_kna1
is_layout = wa_layout
it_fieldcat = it_fieldcat
it_events = it_events
TABLES
t_outtab = it_kna1.
or if you want top of page
populate the events table and use alv_commentary_write
wa_listheader-typ = 'H'.
wa_listheader-info = 'Customer Details'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader
i_logo = 'EDSLOGO'
I_END_OF_LIST_GRID =
I_ALV_FORM =
REFRESH it_listheader.
try the below code u will get a clear picture
report zalv no standard page heading.
TYPE-POOLS : slis.
TABLES: kna1.
TYPES : BEGIN OF ty_kna1 ,
kunnr LIKE kna1-kunnr,
name1 LIKE kna1-name1,
land1 LIKE kna1-land1,
END OF ty_kna1.
DATA: it_kna1 TYPE TABLE OF ty_kna1.
DATA : it_fieldcat TYPE slis_t_fieldcat_alv,
wa_fieldcat TYPE slis_fieldcat_alv.
DATA : wa_layout TYPE slis_layout_alv .
DATA : it_events TYPE slis_t_event ,
wa_events TYPE slis_alv_event.
DATA : it_listheader TYPE slis_t_listheader,
wa_listheader TYPE slis_listheader,
it1_listheader TYPE slis_t_listheader,
wa1_listheader TYPE slis_listheader.
DATA: i_title_kna1 TYPE lvc_title VALUE 'FIRST LIST DISPLAYED'.
INITIALIZATION.
PERFORM getevents using it_events.
PERFORM desinlayout.
START-OF-SELECTION.
PERFORM desinfieldcat.
PERFORM datafetching.
PERFORM display.
*& Form desinfieldcat
text
--> p1 text
<-- p2 text
FORM desinfieldcat .
wa_fieldcat-row_pos = 1.
wa_fieldcat-col_pos = 1.
wa_fieldcat-fieldname = 'KUNNR'.
wa_fieldcat-seltext_l = 'Cust Num'.
wa_fieldcat-datatype = 'CHAR'.
wa_fieldcat-outputlen = 10.
wa_fieldcat-tabname = 'IT_KNA1'.
wa_fieldcat-key = 'X'.
wa_fieldcat-hotspot = 'X'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-row_pos = 2.
wa_fieldcat-col_pos = 2.
wa_fieldcat-fieldname = 'NAME1'.
wa_fieldcat-seltext_l = 'Name'.
wa_fieldcat-datatype = 'CHAR'.
wa_fieldcat-outputlen = 35.
wa_fieldcat-tabname = 'IT_KNA1'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
wa_fieldcat-row_pos = 3.
wa_fieldcat-col_pos = 3.
wa_fieldcat-fieldname = 'LAND1'.
wa_fieldcat-seltext_l = 'Country'.
wa_fieldcat-datatype = 'CHAR'.
wa_fieldcat-outputlen = 10.
wa_fieldcat-tabname = 'IT_KNA1'.
APPEND wa_fieldcat TO it_fieldcat.
CLEAR wa_fieldcat.
ENDFORM. " desinfieldcat
*& Form datafetching
text
--> p1 text
<-- p2 text
FORM datafetching .
SELECT kunnr name1 land1
FROM kna1
INTO TABLE it_kna1
UP TO 30 ROWS.
ENDFORM. " datafetching
*& Form display
text
--> p1 text
<-- p2 text
FORM display .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
I_GRID_TITLE = i_title_kna1
is_layout = wa_layout
it_fieldcat = it_fieldcat
it_events = it_events
TABLES
t_outtab = it_kna1.
ENDFORM. " display
*& Form desinlayout
text
--> p1 text
<-- p2 text
FORM desinlayout .
wa_layout-zebra = 'X'.
wa_layout-colwidth_optimize = 'X'.
*wa_layout-edit = 'X'.
ENDFORM. " desinlayout
*& Form getevents
text
--> p1 text
<-- p2 text
FORM getevents using p_it_events type slis_t_event.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
et_events = p_it_events
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE p_it_events INTO wa_events WITH KEY name = 'TOP_OF_PAGE'.
wa_events-form = 'TOP_OF_PAGE'.
MODIFY it_events FROM wa_events TRANSPORTING form WHERE name = wa_events-name.
ENDFORM. " getevents
*& Form populatevents
text
--> p1 text
<-- p2 text
FORM populatevents .
READ TABLE it_events INTO wa_events WITH KEY name = 'TOP_OF_PAGE'.
wa_events-form = 'TOP_OF_PAGE'.
MODIFY it_events FROM wa_events TRANSPORTING form WHERE name = wa_events-name.
ENDFORM. " populatevents
*& Form top-of-page
text
FORM TOP_OF_PAGE.
wa_listheader-typ = 'H'.
wa_listheader-info = 'Customer Details'.
APPEND wa_listheader TO it_listheader.
CLEAR wa_listheader.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader
i_logo = 'EDSLOGO'
REFRESH it_listheader.
ENDFORM. "top-of-page
REWARD IF HELPFUL
PRASANTH
Maybe you are looking for
-
Icloud Lost photos in Camera Roll when I backed up to my Mac
I recently took a bunch of photos (while synced with icloud) and upgraded my phone from 4g to 4gs...I saw my pictures on the phone prior to syncing to my computer (macbook). When I synced my phone to my computer, off of the old back-up (on my mac), i
-
CitiBank Credit Card Nightmare - Please go back to Capital One
I am ready to cancel my best buy credit card. On December 27, 2013, there was fraud on my account (I believe from the Target breach from black friday sales). Anyways, there was fraud and my card was canceled. However, I didn't find this out until
-
Unable to associate PDF files to Acrobat Standard 7 after latest reader 9 patch
I am unable to make PDF files open as Acrobat standard 7 as my default PDF viewer. I have tried to right click open with, more, browse to acrobat standard 7 folder, coose acrobat program, then open. The acorbat standard 7 program never gets listed in
-
Passing Input values to Adapter Module
Hi I have write some simple adapter module in my sender file adapter. in order to make it more flexible i need to pass 2 input parameters at run time so that I can update the Values in SAP tables using JCO CALL along with filename. please advise how
-
Recent drop in broadband speed
Hi, I've been with BT approx 2 months now (since I moved into my new house) and have usually got a speed of ~2Mbps. However over the past few days I've noticed an obvious drop in speed. I've run the BT Speed Test and here are my results: Download spe