What is meant by Swing?
Answers were Sorted based on User's Feedback
Answer / chnvganesh_mca
Swing is a library of GUI controls which improves upon
the Abstract Window Toolkit.
AWT uses operating system calls to draw components;
Swing draws components using its own methods. This gives
developers much greater flexibility in designing the look
and feel of their applications, while at the same time
ensuring that the applications maintain the same look and
feel across different platforms.
Swing provides significantly enhanced functionality,
such as actions, tables, trees, images buttons, tabs,
toolbars, and sliders.
| Is This Answer Correct ? | 23 Yes | 2 No |
Answer / jitender singh
Swing is a library of GUI controls which improves upon
the Abstract Window Toolkit.
AWT uses operating system calls to draw components;
Swing draws components using its own methods. This gives
developers much greater flexibility in designing the look
and feel of their applications, while at the same time
ensuring that the applications maintain the same look and
feel across different platforms.
Swing provides significantly enhanced functionality,
such as actions, tables, trees, images buttons, tabs,
toolbars, and sliders.
swing is actuallly part of a larger family of java product
know as java foundation classes(JFC) which have many
features.swaing is used to create a feature rich user
interface with icon,images,tooltips and customized
controls.It is a part of the GUI components.
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / ramya
Swing is basically a set of customisable graphical
components whose look-and-feel can be dictated at runtime.
• Pre-built look-and-feel: Motif, Windows, Macintosh,
Metal on a any platform
• Personal look-and-feel also definable
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / rego
Basically swing is java framework it willAWT uses operating
system calls to draw components;
Swing draws components using its own methods. This gives
developers much greater flexibility in designing the look
and feel of their applications, while at the same time
ensuring that the applications maintain the same look and
feel across different platforms.
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / harivardhan.a
when overlapping occur between lightweightcomponent and
heavyweight component,always heavy weight component is top
2)the lightweight component is one that "borrows" the
screen resources of an ancestic(it has no native resources)
so it is lightweight component
| Is This Answer Correct ? | 7 Yes | 6 No |
Answer / devi
Swing is a set of program component s for Java programmers that provide the ability to create graphical user interface ( GUI ) components, such as buttons and scroll bars, that are independent of the windowing system for specific operating system . Swing components are used with the Java Foundation Classes ( JFC ).
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / mita swain
swing is actuallly part of a larger family of java product
know as java foundation classes(JFC) which have many
features.swaing is used to create a feature rich user
interface with icon,images,tooltips and customized
controls.It is a part of the GUI components.
| Is This Answer Correct ? | 3 Yes | 5 No |
What are swings?
Is swing still used in java?
What are the benefits of using Swing over AWT?
What is the difference between swing and awt in java?
What is difference between swing and awt?
What is swing delegation event model in java?
What are all the components used in Swing?
What do you mean by java swing?
What is jfc? What are the features of jfc?
I want to use the markerfor playing a video using the jmf.Suppose my video length is of 2 hours.I want it to play ex-15 mintue or 20 mintue and should stop after assigning the time.I am providing my piece of code............please help me.... package com.jha.cdac.lila.praveen; import java.awt.BorderLayout; import java.awt.Component; import java.awt.Container; import java.awt.Dimension; import java.awt.Toolkit; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.io.File; import java.net.URL; import javax.media.ControllerAdapter; import javax.media.Manager; /** * * @author vinays */ import javax.media.Player; import javax.media.RealizeCompleteEvent; import javax.media.Time; import javax.swing.JFrame; public class PlayVideo extends javax.swing.JFrame{ Player player; Component center; Component south; // this code is required for playing the video file of mpeg,mp4,mp3,3gp,rm,flv, //wmf,mpv,vob,qt and the asf extension public PlayVideo() { File file = new File("Lesson1.mpg"); try { load(file); // load() } catch (Exception ex) { //Logger.getLogger(LessonNarrative.class.getName ()).log(Level.SEVERE, null, ex); System.out.println("Error while loading file............"+ex); } } //the piece of code given below is used to load the file which user want to play. public void load(final File file) //load the file throws Exception { URL url = file.toURL(); final Container contentPane = getContentPane(); if (player != null) { player.stop(); } // MediaLocator mediaLocator=new MediaLocator (file.toURL()); // DataSource dataSource=Manager.createDataSource (mediaLocator); // player=Manager.createPlayer(url); player = Manager.createRealizedPlayer(url); ControllerAdapter listener = new ControllerAdapter() { @Override public void realizeComplete( RealizeCompleteEvent event) { Component vc = player.getVisualComponent(); player.getVisualComponent(); if (vc != null) { contentPane.add(vc, BorderLayout.CENTER); center = vc; } else { if (center != null) { contentPane.remove(center); contentPane.validate(); } } Component cpc = player.getControlPanelComponent(); if (cpc != null) { contentPane.add(cpc, BorderLayout.SOUTH); south=cpc; } else { if (south != null) { contentPane.remove(south); contentPane.validate(); } } pack(); // //setTitle(file.getName()); //to get the title of Video or Audio File } }; Time tm=new Time(30.4402403); Time tm1=new Time(5.7256199); player.addControllerListener(listener); player.setMediaTime(tm1); player.setStopTime(tm); // player.setMediaTime(new Time(5.0)); //player.setStopTime(new Time(73)); player.realize(); player.start(); } public static void main(String args[]) throws ClassNotFoundException { PlayVideo pv = new PlayVideo(); JFrame f = new JFrame("Lesson1"); f.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { System.exit(0); } }); f.getContentPane().add("Center", pv); f.pack(); Dimension screenSize = Toolkit.getDefaultToolkit ().getScreenSize(); int w = 420; int h = 140; pv.setLocation(screenSize.width/2 - w/2, screenSize.height/2 - h/2); pv.setSize(w, h); pv.setVisible(true); }
Why swing components are called lightweight components?
What is java awt and swing?