Swing is a GUI widget toolkit for Java that is used to build window-based applications. It is built on top of the Abstract Window Toolkit (AWT) and provides a more sophisticated set of GUI components than AWT. Swing components are lightweight since they are written entirely in Java without dependencies on platform-specific implementations. It also supports pluggable look and feels so that applications can have different styles without recompilation.
SWING USING JAVA WITH VARIOUS COMPONENTSbharathiv53
This presentation contains the following topics.,
Introduction to Swing; MVC; Events and Listeners; Adapters; Text
Components; Look and feel; Swing Components; JTextField, JLabel,
JButton, JScrollBar, JSlider, JProgressBar, JList, JComboBox; Containers
and Frames; Layout Managers; Menus and Toolbar; Tables and Trees.
SWING USING JAVA WITH VARIOUS COMPONENTSbharathiv53
This presentation contains the following topics.,
Introduction to Swing; MVC; Events and Listeners; Adapters; Text
Components; Look and feel; Swing Components; JTextField, JLabel,
JButton, JScrollBar, JSlider, JProgressBar, JList, JComboBox; Containers
and Frames; Layout Managers; Menus and Toolbar; Tables and Trees.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
swings.pptx
1. Introducing Swing
Swing is a part of Java Foundation Classes (JFC) that is
used to create window-based applications.
With Java 1.1, Swing was used as a separate library.
It is a set of classes which provides many powerful
and flexible components for creating graphical user
interface.
It is built on the top of AWT (Abstract Windowing
Toolkit) API and entirely written in java.
Unlike AWT, Swing provides platform-independent
and lightweight components.
2. Features of Swings
It has two popular features:
1. Lightweight components
2. Pluggable look and feel
Lightweight components
Swing components are lightweight as they are written
entirely in Java and do not depend on native peers.
they are not restricted to platform-specific
appearance like, rectangular or opaque shape.
3. Pluggable look and feel
The pluggable look arid feel feature allows us to tailor
the look and feel of the application and applets to
the standard looks like, Windows and Motif.
We can even switch to different look and feel at
runtime.
Swing has the capability to support several look and
feels, but at present, it provides support for the
Windows and Motif.
the look and feel of components is controlled by
Swing rather than by operating system, the feel of
components can also be changed.
5. Top Level Containers
Top-level Containers exist mainly to provide a place for
other Swing components to paint themselves. Swing
provides four top-level container classes:
1. JFrame - A top-level window with a title and a border.
2. JWindow - As a rule, not very useful. Provides a
window with no controls or title.
3. JDialog - The main class for creating a dialog window.
4. JApplet - Enables applets to use Swing components.
6. JFrame
import javax.swing.*;
class SwingDemo
{
SwingDemo()
{
JFrame jfrm = new JFrame("A Simple Swing Application");
jfrm.setSize(275, 100);
jfrm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel jlab = new JLabel(" Swing means powerful GUIs.");
jfrm.add(jlab);
jfrm.setVisible(true);
}
public static void main(String args[])
{ // Create the frame on the event dispatching thread.
SwingUtilities.invokeLater(new Runnable()
{
public void run()
{
new SwingDemo();
}
});
}
}
7. JWindow
The class JWindow is a container that can be
displayed but does not have the title bar or
window-management buttons.
Constructors
JWindow()
JWindow(Frame owner)
JWindow(GraphicsConfiguration gc)
8. JApplet
The JApplet class extends the Applet class.
Example
SimpleApplet.java
import javax.swing.*;
import javax.swing.border.*;
import java.awt.*;
public class SimpleApplet extends JApplet {
public void init() {
JPanel p = new JPanel();
p.setLayout(new GridLayout(2, 2, 2, 2));
p.add(new JLabel("Username"));
p.add(new JTextField());
p.add(new JLabel("Password"));
p.add(new JPasswordField());
Container content = getContentPane();
content.setLayout(new GridBagLayout()); // Used to center the panel
content.add(p);
}
}
10. Light Weight Containers
• Lightweight containers do inherit Jcomponent.
• Lightweight containers are often used to
organize and manage groups of related
components because a lightweight container
can be contained within another container.
• One of the examples of lightweight container
is JPanel.
11. JPanel
Panel is a container to hold different Swing components.
One can add any number of components to a panel and
there can be multiple panels in the same frame.
JPanel present in javax.swing package.
Constructors
JPanel ()
JPanel(boolean isDoubleBuffered)
JPanel(LayoutManager layout)
JPanel(LayoutManager layout, boolean isDoubleBuffered)
where,
isDoubleBuffered defines whether the panel is double
buffered or not
12. Example
import javax.swing.*;
import. Java.awt.event.*;
import java.awt.*;
class JPanelExample extends JFrame
{
JPanel panel1,panel2 ;
JTextField txtData;
JButton[] btnData = new JButton[12];
JPanelExample()
{
panel1=new JPanel();
txtData = new JTextField(20);
panel1.add(txtData);
add(panel1,"North");
panel2=new JPanel(new GridLayout(3,4));
for(int i=0;i<=9;i++)
{
btnData[i]=new JButton(""+i);
panel2.add(btnData[i]);
}
add(panel2,"Center");
}
}
class JPanelJavaExample
{
public static void main(String[] args)
{
JPanelExample frame = new JPanelExample();
frame.setTitle("JPanel Java Example");
frame.setBounds(100,200,220,200);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
}
13. Example
import javax.swing.*;
import java.awt.*;
public class PanelsWithJFrameJavaExample extends JFrame
{
private final int WIDTH = 250;
private final int HEIGHT = 120;
private JButton BtnOne = new JButton("One");
private JButton BtnTwo = new JButton("Two");
private JButton BtnThree = new JButton("Three");
public PanelsWithJFrameJavaExample()
{
super("Panels in Java swing");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel PnlOne = new JPanel();
JPanel PnlTwo = new JPanel();
Container cntnr = getContentPane();
cntnr.setLayout(new FlowLayout());
cntnr.add(PnlOne);
cntnr.add(PnlTwo);
PnlOne.add(BtnOne);
PnlOne.setBackground(Color.BLUE);
PnlTwo.add(BtnTwo);
PnlTwo.add(BtnThree);
PnlTwo.setBackground(Color.BLUE);
setSize(300,450);
setVisible(true);
}
public static void main(String[] args)
{
PanelsWithJFrameJavaExample panel = new PanelsWithJFrameJavaExample();
}
}
15. JButton
Declaration of JButton class
public class JButton extends AbstractButton
implements Accessible
Commonly used Constructors of JButton:
Jbutton()
JButton(String s)
JButton(Icon i)
16. Example
import java.io.*;
import javax.swing.*;
class ButtonExample {
public static void main(String[] args)
{
JFrame frame= new JFrame(); // creating instance of JFrame
JButton button = new JButton(" Click"); // creating instance of
// JButton
button.setBounds(150, 200, 220,50); // x axis, y axis, width, height
frame.add(button); // adding button in JFrame
frame.setSize(500, 600); // 400 width and 500 height
frame.setLayout(null); // using no layout managers
frame.setVisible(true); // making the frame visible
}
}
17. JLabel
The object of JLabel class is a component for placing
text in a container. It is used to display a single line
of read only text. The text can be changed by an
application but a user cannot edit it directly. It
inherits JComponent class.
Constructors
JLabel()
JLabel(String s)
JLabel(Icon i)
JLabel(String s, Icon i, int horizontalAlignment)
18. Example
import java.awt.event.*;
import java.awt.*;
import javax.swing.*;
class text extends
{
static JFrame f;
static JLabel l;
text()
{
}
public static void main(String[] args)
{
f = new JFrame("label");
l = new JLabel();
l.setText("label text");
JPanel p = new JPanel();
p.add(l);
f.add(p);
f.setSize(300, 300);
f.show();
}
}
19. JTextField
The object of a JTextField class is a text component
that allows the editing of a single line text. It
inherits JTextComponent class.
Constructor
JTextField()
JTextField(String text)
JTextField(String text, int columns)
JTextField(int columns)
20. import javax.swing.*;
class TextFieldExample
{
public static void main(String args[])
{
JFrame f= new JFrame("TextField Example");
JTextField t1,t2;
t1=new JTextField("Welcome to CMRCET..");
t1.setBounds(50,100, 200,30);
t2=new JTextField("Hi AIDS");
t2.setBounds(50,150, 200,30);
f.add(t1); f.add(t2);
f.setSize(400,400);
f.setLayout(null);
f.setVisible(true);
}
}
21. JTextArea
The object of a JTextArea class is a multi line region
that displays text. It allows the editing of multiple
line text. It inherits JTextComponent class
Constructors
JTextArea()
JTextArea(String s)
JTextArea(int row, int column)
JTextArea(String s, int row, int column)
22. import javax.swing.*;
public class TextAreaExample
{
TextAreaExample(){
JFrame f= new JFrame();
JTextArea area=new JTextArea("Welcome to javatpoint");
area.setBounds(10,30, 200,200);
f.add(area);
f.setSize(300,300);
f.setLayout(null);
f.setVisible(true);
}
public static void main(String args[])
{
new TextAreaExample();
}}