Set Various Look And Feel Of JFrame In Swing Java | Free Java Course In Hindi #3

1,207 views · Published 24 January 2018 · 8:08 · Indexed 12 November 2026

Channel: AndroJavaTech4U · 2018 · Science & Technology

Watch on YouTube

Step by step tutorial in HINDI
swing is extension of awt not replacement.
Swing Pgrogram-
import javax.swing.*;
import java.awt.*;
class SwingFirstApp 
{
JFrame jf;
JButton b;
JLabel l;
JTextField tf;
SwingFirstApp(String title)
{
try
{
// UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");// Motif

// UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); //Native

// UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); //Metal

 UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
}

catch(Exception e)
{
e.printStackTrace();
}


jf=new JFrame(title);
jf.setVisible(true);
jf.setSize(400,400);
b=new JButton("Ok");
l=new JLabel("Welcome to App");
tf=new JTextField(10);
jf.setLayout(new FlowLayout());
jf.add(l);
jf.add(tf);
jf.add(b);
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);


}
public static void main(String ss[])
{
SwingFirstApp ff=new SwingFirstApp("SwingFrame");
}
}
 Download  my you tube channel  Android application from here-
https://www.dropbox.com/s/stoehcarylm5374/AndroJava%20Tech4U.apk?dl=0

awt url-
https://www.youtube.com/watch?v=n9NF1O1xzCg&list=PLnfapp4WoqppnD7iLCygNJV41hrnQKa3b&index=1
path seting-
https://www.youtube.com/watch?v=k2gCo4oKKmg&index=20&list=PLnfapp4WoqpqWgXpfNvPCoQ3tEVUTnsYG

java doc-
https://www.youtube.com/watch?v=NLfXdTtW9q8&index=15&list=PLnfapp4WoqpqWgXpfNvPCoQ3tEVUTnsYG

Connect on Socials:-
Facebook:- https://www.facebook.com/AndroJavaTech4U/
Twitter:- https://twitter.com/AndroJavaTech4U
Google Plus:- https://plus.google.com/u/0/+AndroJavaTech4U
LinkedIn:- https://www.linke

More from this channel