:: Home Page
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   Errors
   Testimonials Refer this Site  Refer This Site to Your Friends  Site Map  Contact Us      
 Categories >> Software >> Java Related >> Java J2EE
  Core Java (1763)   Advanced Java (347)   Swing (45)   EJB (134)   Servlets (256)
  Struts (198)   JDBC (188)   JMS (89)   SunOne (10)   J2EE (73)
  Weblogic (149)   Websphere (14)   Java Networking (20)   Java J2EE AllOther (86)
Suggest New Category 


Question Asked @ Answers Views     Select
ublic class Java_Coding_Samples { public static void JavaHungr(NumberFormatException ae){ System.out.println("integer"); } public static void JavaHungry(Exception e){ System.out.println("string"); } public static void JavaHungry(ArithmeticException ae){ System.out.println("object"); } public static void main(String[] args) { JavaHungry(null); }    0  49
what is the difference between static class and singleton class? can we create static class?    2  208
how do you Handle Front End Application data against DB with example?    0  124
difference between HashMap, Hashset and hashTable?    1  140
difference between Abstract and Interface?    1  119
How do you iterate in Hashmap?    0  73
difference. between List and Set?    2  113
what are getters and setters in Java with examples?    0  60
what is the Scope of Final Keyword in Java?    1  90
What is the difference between Super and This Keyword?    2  83
What is the difference between static and non-static with examples?    0  73
what is associative array    1  123
What is Stream Message ?    1  202
How does the Application server handle the JMS Connection?    1  161
What are the core JMS-related objects required for each JMS-enabled application?    1  127
E-Mail New Answers        Answer Selected Questions       
 [1]    2  ... 16   ... 31   ... 46   ... 61   ... 76   ... 91   ... 106   ... 121   ... 136   ... 151   ... 166   ... 181   ... 196   ... 211    Next
Un-Answered Questions
 Question Views   Select
what are RemoteObjects? 1116
Difference between DurableSubscription and non- DurableSubscription? 646
what is mean by ooad? where we are using? can you tell me any real time example? 1044
hr interview how many minutes asking question 435
What design pattern you have used in your project? I answered Factory pattern, how it is implemented? What are its advantage? Do know about Abstract Factory? 561
How Struts internally works? For Example if we type the URL "/" how the process goes internaly? How the struts-config.xml loaded? 1369
Q1.A. Write note on “The class path Environment Variable”? B. Which are different kinds of source code? Q2.A. How to create an interface? B. Why convert an applet to an application? Q3.A. How to use Media tracker Class. B. How to use string tokenizer class. Q4 A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on “The properties class” Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites. 3938
how to make a index.jsp for running the site in internet and find an error for connection with weblogic server and java that give an error invalid object name.and how to maintain session. 701
make a method which any number and any type of argument and print sum of that arguments..... 341
how to connect from struts to database through hibernet and where u can modify the class 985
what is meant by proxy server 2476
What is the use of 27
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); } 2269
What is the SimpleTimeZone class? 573
What are restrictions on triggers? 637
E-Mail New Answers        Answer Selected Questions