Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

Swing Interview Questions
Questions Answers Views Company eMail

what is difference between checked and unchecked exception plz explain examples ?


5 17751

how can u handle runtime exceptions in java plz explain with examples briefly?

Fujitsu, IBM,

3 16654

how to give transparency for JComboBox,JListBox and JTable


2 7152

How to merging the particular cells in JTable

1 9725

how to give transparency to JComboBox,JList and JTable

Ness Technologies,

5 15321

when i run Frame program, it display output in supparate window.i try to close using "X" it not close.min'-' & max'+' are working.pls what is problem? i run in editplus. folowing program i given. import java.awt.*; class Form1 { Frame f1=new Frame("loginpage"); Label l1=new Label("username"); Label l2=new Label("password"); TextField tf1=new TextField(); TextField tf2=new TextField(); Button b1=new Button("submit"); Form1() { f1.setLayout(new FlowLayout()); f1.add(l1); f1.add(tf1); f1.add(l2); f1.add(tf2); f1.add(b1); f1.setSize(437,440); f1.setVisible(true); //f1.dispose(); } public static void main(String[] args) { Form1 f=new Form1(); } }

4 6426

Difference between ligt weight and heavy weight?

5 22658

can we create a object in static block class A { static { A a=new A(); } }

Cap Gemini,

7 12043

Hello ..Friends. I need a Code which makes a software of Enter the cheque Details.. means any enduser enter the details in a Particular field that should be printed on the paper On Cheque. at the backend side it sholud be printed on pdf file. Thanks in Advance


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; import; import; import; /** * * @author vinays */ import; import; import; 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); }


When i m clicking on next another frame is open but i want to hide the previous frame...........but it is not happening....still both frame are to make one frame to hide.......please help me.......

9 10409

please any one explain this project: Minimizing recovery state in geographic ad hoc routing


1 2216

Hello Everyone.. I m trying to develop a java swing application where i can display a doc file Jeditorpane or Jtextpane.


am searching for the job based on java, swing, currently working small company. they are not giving any salary slip, offer letter. so if i try outside for MNC's they start with previous company details. what should i do..? please help me to get job and make my career.



Explain the below Statement if(ae.getSource()==b1)

IPSG Systems, TCS,

2 1979

Post New Swing Questions

Un-Answered Questions { Swing }

Why should any swing call back implementation execute quickly?


What is Java Swing?


What is the difference between invokeAndWait() and invokeLater()?


What is swing?


How to align components in java swing?


Is swing better than awt?


What is the purpose of serialization in swings?


Why swings are used in java?


Why would you use swingutilities.invokeandwait or swingutilities.invokelater?


What is the use of swing in java?


What is pane in swing?


Why do we use swing in java?


Why are swing components called lightweight?


What is an event and what are the models available for event handling?


What is jfc? What are the features of jfc?