CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1

Thread: Sharing code

  1. #1
    Join Date
    Feb 2017
    Location
    Montreal
    Posts
    54

    Red face 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
  •  





Click Here to Expand Forum to Full Width

Featured