Created
February 22, 2020 17:42
-
-
Save MinSomai/854544aea87d75c34e2701e645e226aa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package hw; | |
import java.awt.Color; | |
import java.awt.Font; | |
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
import javax.swing.JLabel; | |
public class TextShow13 extends JFrame{ | |
JPanel panel; | |
JLabel label; | |
public TextShow13() { | |
setSize(200,400); | |
setVisible(true); | |
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); | |
panel=new JPanel(); | |
Font fnt=new Font("Arial",Font.BOLD + Font.ITALIC,12); | |
label=new JLabel("TEXT Display Example!"); | |
add(panel); | |
label.setFont(fnt); | |
label.setBounds(200,200, 10, 22); | |
panel.add(label); | |
} | |
public static void main(String[] args) { | |
new TextShow13(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment