|
-
February 24th, 2017, 12:02 PM
#1
Sharing code
The following code will display a popup dialog with text and graphics.
I am assuming you are using Netbeans and used the designer already to create your popup.
private void <yourname>ActionPerformed(java.awt.event.ActionEvent evt)
{tring msg = "" Some msg" ;
<yourpopup>.setTitle("Trump on Multiplication");
<yourpopup>.setFont(new java.awt.Font("Comic Sans MS", 1, 18));
<jTextArea>.setFont(new Font("Comic Sans MS", Font.BOLD, 14));
<jTextArea>.setText(msg);
<yourpopup>.setVisible(true);
};
Anytyhing <> substitute your name for JDialog or jTextArea
This code is more or straight out of my program. You can change the fonts to anything you want.
Last edited by Azoth; February 24th, 2017 at 03:05 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|