Home Discussion Discuss: Java Example Codes and Tutorials

  • some help in programmingswati shriwastav April 5, 2011 at 7:05 PM

    i've a program in library management its GUI is running but the connectivity with MS-access is not getting done. please help me as soon as possible. Here is the code

  • how i run this program error??? joydeep April 8, 2011 at 5:49 PM

    package Student; // public class Person // { // int age; // String name; // public Person() // { // age=0; // name=""; // } // public void getPersonDetail(int newAge,String newName) // { // age=newAge; // name=newName; // } // public void putPersonDetail() // { // System.out.println("Name:"+name); // System.out.println("Age:"+age); // } // } // public interface Sports // { // public final int point=2; // public void putPoint(); // } // public class Stud extends Person implements Sports // { // int rollno; // String dept; // public Stud() // { // rollno=0; // dept=""; // } // public void getStudentDetails(int newNo, String newName,int newAge,String newDept) // { // getPersonDetail(newAge,newName); // rollno=newNo; // dept=newDept; // } // public void putStudentDetails() // { // putPersonDetail(); // System.out.println("Roll No"+rollno); // System.out.println("Department:"+dept); // putPoint(); // } // public void putPoint() // { // System.out.println("Point:"+point); // } // } // import Student.*; // class StudentDemo // { // public static void main(String args[]) // { // stud newStudent=new Stud(); // newStudent.getStudentDetail(101,"JOYDEEP",66,"JAVA"); // newStudent.putStudentDetail(); // } // }

  • j2se,j2eegaurav kumar rajawat April 9, 2011 at 10:50 AM

    j2se is most programing langauge

  • access to a remote machine using IP adresseRaSdab April 16, 2011 at 5:05 PM

    hi all,i want to access to a remote machine using it's ip adress to recover some information of computrs like (os,ip adresse,mac adress,list of installed software,....). i I managed to recover those information but in a localhost i need your help to do that for a remote machine using java. thikks for your comments. :)

  • Regarding RMIParikshit Kansara April 20, 2011 at 7:32 PM

    hi,I am working on Traveling Tournament problem project.I have already implemented this project in java. running on single system.I want implement this project in distributed environment and how i can implement this using RMI??

  • javaraju April 21, 2011 at 12:10 PM

    java question

  • Corporate Java TrainingJava Training April 23, 2011 at 11:28 PM

    thank's for info java is strong software language..

  • javaYogesh April 25, 2011 at 11:12 AM

    how to use Applet in our class

  • javayogesh April 25, 2011 at 11:14 AM

    how to add shortct in menuitem

  • want java trainingkhan abdul kalam`` May 23, 2011 at 10:11 PM

    just mail or contact me abt the java training

  • core javaIrfan Ahmed May 25, 2011 at 4:55 PM

    How do i change background color of jLabel in swings on mouse moved and mouse out.

  • Java Programmanish May 26, 2011 at 7:07 PM

    Create a program that represents deck of cards using object oriented approaches. Provide typical functions for utilizing a card deck.

  • Swing and access to remote databasesyed May 28, 2011 at 4:48 AM

    Hello, I want to develop a Swing database application that uses database at remote location. Please help me to develop this. It should work similar to a J2EE application. Instead of using in browser, this should run like ordinary desktop application. what are the technology to be used?.

  • J2EEkavita May 28, 2011 at 3:28 PM

    pLZ U provide d notes of J2EE at my email id. Thanks& regarda kavita

  • JavaSaurabh Parikh May 30, 2011 at 10:41 AM

    Needed your contact details for Sun Java courses in Ahmedabad. Regards Saurabh

  • javasrilekha May 31, 2011 at 8:54 PM

    sir,i need to know the procedure to apply for scja and scjp exams?

  • java mouseeventsram June 1, 2011 at 7:57 PM

    want code when mouse moves onto a image then we should get a checkbox type where we should have the information of the image

  • java vikki June 2, 2011 at 10:55 PM

    hi I am vikki from new delhi and I am preparin scjp&scwcd exam

  • javajagath prabhu.n June 7, 2011 at 4:41 PM

    about java

  • abt notesshumayla mirza June 4, 2011 at 5:45 PM

    nice notes but something more should be....

  • java kanchan June 7, 2011 at 11:52 PM

    nice style of teaching.Thanks. I want to know about the procedure of downloading this.

  • for loopDUMINDA June 10, 2011 at 8:40 PM

    its important 4 me

  • java script programsue June 15, 2011 at 1:07 AM

    The program will input Data of Salesman Id, Item code, and number of cuestomer. Sales id is 5digit long, and items code range from 100-300 if Item code is 100-150, display " aim high" if item code is 150-200, display "good sales" if item code is 250-300, display "excellent sales" each customer should not purchase 3 items at once final report should produce folling summary Salesman ID Item code no of customers 12356 100 1 45678 112 2 kindly advise

  • about core javajanardhan putta June 18, 2011 at 8:51 PM

    send me about core java clearly

  • thanksnaresh June 18, 2011 at 11:05 PM

    it very helpful for me thanks a lot sir

  • java projectvandana anghan June 20, 2011 at 10:54 AM

    hello, i want to do project in java.Can i do my project on anti-virus engine? please guide me.

  • javavishvambhar June 21, 2011 at 7:35 PM

    how to create animation in core java

  • wla lngbhea June 22, 2011 at 9:21 AM

    nice tutorial in java lectures and cdes!!!

  • JAVA , the competing language.Karthik(HYDERABAD, INDIA) June 25, 2011 at 1:46 AM

    I love this website . I request this site to present Java with simple examples in order of precedence of chapters.

  • javasantosh June 25, 2011 at 9:10 PM

    it z good if u give in detail

  • Asking codeGaurav June 26, 2011 at 2:07 PM

    I wants to know what is the code of sun medical dictionary and what is the cost of purchasing it

  • javauday July 11, 2011 at 7:45 AM

    where we have to place the source code as part of your project?

  • JavaN.Priyadharsini June 30, 2011 at 2:09 PM

    Good

  • javashaik Abdullla July 1, 2011 at 12:22 AM

    very nice & useful

  • question about in javaR.senthil kumar July 2, 2011 at 2:00 PM

    //what is a output if error accured what is the reason class a { public static void main(String args[]) { byte a=10; byte b=10; byte c=a+b; System.out.println(c); } }

  • javarosh July 2, 2011 at 2:56 PM

    what is d/f b/w assertion & exception

  • thankskavita gupta July 2, 2011 at 9:15 PM

    i like this website.

  • I learn to java.kyiminhan August 12, 2011 at 1:41 PM

    I'm so interest in java programming.

  • Servlet Manimala August 15, 2011 at 2:49 PM

    When am trying to open the servlet page , have given the class name ->next ->next ->finish.When the page is opening , showing errors. import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; (javax.servlet couldn't be resolved )like that it is showing

  • project on online admissionkhan naba August 16, 2011 at 10:21 PM

    please give me project on online admission system in java or asp.net

  • how to make exe of a java filePinku Borah August 18, 2011 at 4:13 PM

    Rose india help me a lot to learn java.thanks for such a usefull site. I have develop a small software(windows application) with core java.But i want the steps for building exe of that java file.what are the steps?

  • wjaCiQErPZYtNzIqSuevonne June 15, 2013 at 2:54 PM

    I'm impressed you sohlud think of something like that

  • Java programsMd Arif August 23, 2011 at 10:13 AM

    I need all program of java

  • corejavaM.NIKHILA August 24, 2011 at 2:14 PM

    i have sum questions

  • Printing BinaryTreepgr August 27, 2011 at 4:02 PM

    How to print array values in a binary tree form?

  • core javamalli August 27, 2011 at 7:36 PM

    i won to simple programs

  • Thanks to RoseindiaYashwanth August 31, 2011 at 4:56 PM

    I would really like to thank Roseindia for its continuous and valuable effort to make the contents better. As a regular user i will say It's really a good source of knowledge for any kind of users(S/W). Thanks a lot.

  • hi.about javapriyapanner June 4, 2013 at 6:42 PM

    i want to interest learn java.what is basic for java?.it's esay or difficult?,how to learn java,how to take step to learn easily?plz,help .give ans my email...........

  • respected sirm.jayashree September 10, 2011 at 2:08 PM

    difference between java and c++? what is meant by object oriented progrmming java?

  • plasticdaminee September 15, 2011 at 11:27 AM

    give me a project of sales management system otherwise i tell to all my friends no body search this site

  • Java Monthly MagazineTanmaya Kumar Sahu September 15, 2011 at 5:09 PM

    I want monthly magazine of java from sun.

  • javaVergin sheeba September 17, 2011 at 7:44 AM

    This java tutorials is very use full to the students

  • javaxyz May 22, 2013 at 1:05 PM

    ---util--- public class connect { public String server = "jdbc:mysql://localhost/form"; String userName = "root"; String password = "root"; Connection con=null; public Connection getConnection() { try { Class.forName("com.mysql.jdbc.Driver"); con = (Connection)DriverManager.getConnection(server, userName, password); } catch (Exception e) { System.out.println("" + e.toString()); } return con; }

  • javaxyz May 22, 2013 at 1:07 PM

    --DAO--- public boolean insertData(form1 rg) { try { //PrintWriter out = response.getWriter(); Connection con = new connect().getConnection(); PreparedStatement ps = con.prepareStatement("insert into form1 values('" + rg.getName() + "','" + rg.getGender() + "','" + rg.getHobbies() + "','"+rg.getCity()+"','"+rg.getAddress()+"','"+rg.getUsername()+"','"+rg.getPassword()+"')"); ps.executeUpdate(); return true; } catch(SQLException e){ return false; } catch (Exception ex) { return false; }

  • javaxyz May 22, 2013 at 1:08 PM

    --manager-- public boolean insertData(String name,String gender, String hobbies, String city, String address,String username,String password) { form1 rg = new form1(); rg.setName(name); rg.setGender(gender); rg.setHobbies(hobbies); rg.setCity(city); rg.setAddress(address); rg.setUsername(username); rg.setPassword(password); boolean b= new form1DAO().insertData(rg); if(b==true) { return true; } else{ return false; } }

  • javaxyz May 22, 2013 at 1:09 PM

    --servlet-- PrintWriter out = response.getWriter(); String name = request.getParameter("name"); String gender = request.getParameter("gender"); String hobbies = request.getParameter("hobby"); String city = request.getParameter("cities"); String address = request.getParameter("address"); String username = request.getParameter("username"); String password = request.getParameter("password"); formManager rm = new formManager(); boolean b=rm.insertData(name,gender, hobbies, city,address,username,password); if(b==true){ out.print("<script> alert('yes') </script>"); } else{ out.print("<script> alert('no') </script>");}

  • javadlarej September 20, 2011 at 5:31 PM

    ,nice web

  • java languageBIDYUT DALAL September 21, 2011 at 12:36 PM

    add two number without classs

  • Help in understanding the flow of learning.sukhendu rana September 29, 2011 at 7:04 PM

    Sir/Madam, I am very keen to learn Java. Although your website has helped me emmensly with the 'New to Java' section, I want to learn further and slowly get expertise with the help of your website. Hence, I would like to know the process/flow to learn Java. I am getting confused with so many links. Could you please provide me the step by step links/Tutorials which I should follow in order to become a Java/J2EE professional. Any help would be greatly appreciated. Thank you. Sukhendu.

  • jquestion about javaasma October 2, 2011 at 8:43 PM

    how to write one simple java program that will open any three programs at the same time ?

  • DeploymentRohit VAiragkar October 4, 2011 at 10:01 AM

    How to deploy a .java file? I don't want to deploy on a server,only to a single machine.

  • featuresvaibhav October 5, 2011 at 6:20 PM

    great knowledge of java featuers in this site

  • java coremayank rajpoot February 20, 2013 at 1:54 AM

    this solution i am stisff

  • java tutorialOrtega October 19, 2011 at 12:42 PM

    write a java application for a video club that must do the following; 1)register new members 2)register new videos 3)be able to rent out or borrow videos 4)search videos from the database

  • Java Basicssanthu October 22, 2011 at 12:20 AM

    Please send me Advanced Java Concepts. Thanks in Advance.

  • HiStop 0x00000124 October 24, 2011 at 4:08 PM

    Great tutorial i really learn a lot of things from this blog. Thanks for sharing

  • one questionpomma January 29, 2013 at 5:02 AM

    list the difference between extend and implements keywords>example program

  • ITdungar mal November 2, 2011 at 4:04 PM

    wants download

  • javasathyam November 10, 2011 at 4:47 PM

    this web site imprves the knowldge through the communication with diff person

  • Passing inputs to a jar file through a fileSeshu February 23, 2013 at 3:50 PM

    Hi i've Jar file which runs successfully with built in inputs. But i want to give inputs to the jar file through a file..can anyone explain?

  • doubt in ASCII Surya Krishna Bharath November 16, 2011 at 1:04 PM

    hi sir/madam i need your information that when 9 is char then it's ASCII is "57" is it posible to find that what is the ASCII value for "99"as a char. sorry sir i am not able ask correctly what my doubt was ,so please excuse me and send me replay

  • javajyotsna November 17, 2011 at 4:31 PM

    Iwant to learn adv java nad some topics in core java

  • About javaAryan Raj November 23, 2011 at 1:03 PM

    Actually i am very impresed to online java tutorials

  • Help in writing a programLaura November 24, 2011 at 3:28 AM

    I am just wondering how to write a program that finds the first palindromic prime number above 100,000 and i have to Include the value of this prime in a comment at the start of the code.

  • computerRaghav Dang November 24, 2011 at 9:27 AM

    cool

  • javaVasuneet November 24, 2011 at 9:29 AM

    just lovely :P

  • Javajitender November 24, 2011 at 12:49 PM

    It's good

  • Java netbeansKrish November 26, 2011 at 1:22 PM

    I'm a student of grade 9 and i hope this site will help me learn Java

  • nice PostDeepak November 28, 2011 at 12:01 AM

    Nice work guys. www.de-tutorials.com

  • javapavan November 28, 2011 at 3:55 PM

    it is good

  • ssrudrasivaprasad December 1, 2011 at 2:51 PM

    give more programming examples with simple logic

  • subrudrasivaprasad December 1, 2011 at 2:52 PM

    plz give easy examples to understood

  • j2eeramuk December 9, 2011 at 8:12 AM

    Patient patientobj=new Patient() ; Patient patientobj1=new Patient(); Patient_dao patientdaoobj=new Patient_dao(); String name=request.getParameter("patientname"); String disease=request.getParameter("diseasename"); int wardNo=Integer.parseInt(request.getParameter("wardnumber")); patientobj.setPatientname(name); patientobj.setDiseasename(disease); patientobj.setWardnumber(wardNo); patientdaoobj.insert(patientobj); ArrayList list =patientdaoobj.view(patientobj1); request.setAttribute("data",list); RequestDispatcher rd=request.getRequestDispatcher("/view.jsp"); rd.forward(request,response);

  • javaajay December 23, 2011 at 8:49 AM

    Java is object

  • visul basic 6pratim December 28, 2011 at 11:25 PM

    How to give connection to MS access database to disply name in text boxes from database

  • help meqaseh January 4, 2012 at 12:53 PM

    you are required to develop a simulation program on array-based list. The array can store up to maximum ten integer or string values.The application should be able to perform basic operations such as inserting,deleting and displaying the array's content. any extra operations are welcome.The application should prompt user a menu. you are free to perform either forward or backward approach for inserting process.for deleting purposes remove the most front element in the list.

  • javajaya January 4, 2012 at 4:39 PM

    java is advanced program

  • javacaptainportal January 9, 2012 at 4:33 PM

    good site

  • Stella January 15, 2013 at 10:18 PM

    could you please send the C-pgrm code for the mirror image of floyd's triangle

  • c-pgrm code Stella January 15, 2013 at 10:21 PM

    could you please send the C-pgrm code for the mirror image of floyd's triangle

  • java syllabusvinitha vasudevan January 13, 2012 at 6:35 PM

    get me a latest programs in it

  • how to update?harish.k January 17, 2012 at 10:58 PM

    package com.tcs.ilp.usermanagement.DAO; import java.sql.Connection; import java.sql.Statement; import com.tcs.ilp.usermanagement.bean.StudentViewBean; import com.tcs.ilp.usermanagement.connection.ConnectionManager; /** * StudentUpdateDAO * @author 539064 * */ public class StudentUpdateDAO { static Connection currentCon = null; public static StudentViewBean update(StudentViewBean bean) { //preparing some objects for connection Statement stmt = null; String email = bean.getEmail(); String address=bean.getAddress(); String mobileno=bean.getMobileno(); String username=bean.getUsername(); System.out.println(username); String s ="update student set email='"+email+"',address='"+address+"',mobileno='"+mobileno+"' where username='"+username+"'"; // "System.out.println" prints in the console; Normally used to trace the process try { //connect to DB currentCon = ConnectionManager.getConnection(); stmt=currentCon.createStatement(); stmt.executeQuery(s); stmt.executeQuery("commit"); bean.setValid(true); } catch (Exception ex) { System.out.println("update failed: An Exception has occurred! " + ex); } //some exception handling finally { if (stmt != null) { try { stmt.close(); } catch (Exception e) {} stmt = null; } if (currentCon != null) { try { currentCon.close(); } catch (Exception e) { } currentCon = null; } } return bean; } }

  • javamail helpSandesh January 18, 2012 at 6:40 PM

    Hello experts, i am trying to read mail from gmail, which is working perfectly in the local machine. but when I update the server i am getting the following error . javax.mail.MessagingException: Connect failed; nested exception is: java.net.ConnectException: Connection timed outfalse The Code i am using is : Session session = Session.getDefaultInstance(props, null); Store store = session.getStore("imaps"); store.connect("imap.gmail.com", "<username>", "password"); System.out.println(store); Folder inbox = store.getFolder("Inbox"); inbox.open(Folder.READ_ONLY); Message messages[] = inbox.getMessages(); for(Message message:messages) { System.out.println(message); }

  • surendersurender January 19, 2012 at 5:05 PM

    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <html> <head> <title>UIViewRoot</title> </head> <body bgcolor="#ffffff"> <h1>UIViewRoot example</h1> <f:view> <h:outputLabel for="validatorInput"> <h:outputText value="Enter text:"/> </h:outputLabel> <h:inputText id="myOtherInput"> <f:validateLength minimum="0" maximum="3"/> <f:validateLongRange minimum="1" maximum="100"/> </h:inputText> <h:message for="myOtherInput" showDetail="true" showSummary="true" warnStyle="color: green" infoStyle="color: blue" errorStyle="color: red"/> <br><br> <h:panelGroup id="myGroup" styleClass="table-background"> <h:graphicImage url="images/hello.gif"/> <h:outputText value="Column 1"/> <h:outputText value="Column 2"/> </h:panelGroup> <h:panelGrid columns="3" cellpadding="1" border="1" width="40%"> <h:outputText value="(1,1)"/> <h:outputText value="(1,2)"/> <h:outputText value="(1,3)"/> <h:outputText value="(2,1)"/> <h:outputText value="(2,2)"/> <h:outputText value="(2,3)"/> </h:panelGrid> <h:panelGrid columns="4" styleClass="table-background" headerClass="page-header" columnClasses="table-odd-column, table-even-column" footerClass="table-footer" cellpadding="1" border="1" width="40%"> <f:facet name="header"> <h:panelGroup> <h:outputText value="This is a sample header."/> </h:panelGroup> </f:facet> <h:outputText value="(1,1)"/> <h:outputText value="(1,2)"/> <h:outputText value="(1,3)"/> <h:outputText value="(1,4)"/> <h:outputText value="(2,1)"/> <h:outputText value="(2,2)"/> <h:outputText value="(2,3)"/> <h:outputText value="(2,4)"/> <h:outputText value="(3,1)"/> <h:outputText value="(3,2)"/> <h:outputText value="(3,3)"/> <h:outputText value="(3,4)"/> <f:facet name="footer"> <h:outputText value="This is the footer."/> </f:facet> </h:panelGrid> </f:view> </body> </html>

  • java referanceBal pawar January 20, 2012 at 12:11 PM

    i want to lear java technologies withen one month it is possible?

  • Java using MS WordJayapal ReddyM January 21, 2012 at 10:26 AM

    Is it possible to develop java code using MS Word, if possible what are necessary settings required in MS Word Editior

  • Java using MS WordJayapal ReddyM January 21, 2012 at 10:28 AM

    Is it possible to develop java code using MS Word, if possible what are necessary settings required in MS Word Editior

  • Java using MS WordJayapal ReddyM January 21, 2012 at 10:30 AM

    Is it possible to develop java code using MS Word, if possible what are necessary settings required in MS Word Editior

  • Java using MS WordJayapal ReddyM January 21, 2012 at 10:31 AM

    Is it possible to develop java code using MS Word, if possible what are necessary settings required in MS Word Editior

  • databaseNaresh January 21, 2012 at 11:31 AM

    how to retrieve the table data in oracle using core java fundamentals

  • Adding a sound file to a java appletBernard Clark January 22, 2012 at 8:13 AM

    I tried to post a question about adding a sound file to an applet, tried to send the program but couldn't seem to get past the sign in page

  • Java program to write string in triangular form.Sushma January 26, 2012 at 2:14 AM

    i want to know the logic of writing a java program for the string in triangular form. For example 'my name is sushma' is a string i have write java program to display the name in triangular form.

  • java save n complation p satish January 26, 2012 at 7:34 PM

    hi sir i have written the program saving it with the same class name n when i am executing it is showing unable to read the file . what should i have to do ?

  • vYcuSMKlSHpyTyya January 19, 2013 at 2:07 AM

    That's an inegnoius way of thinking about it.

  • java programmingrukmangad January 31, 2012 at 12:06 PM

    java language is very popular.

  • java Exampleabhay singh February 1, 2012 at 12:18 PM

    Project Code Java Example Codes

  • java stringlengthGanesh Rahinj January 11, 2013 at 2:45 PM

    import java.lang.*; import java.io.*; class StringLength { public static void main(String[] args) throws IOException { System.out.println("String lenght example!"); BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Please enter string:"); String str = bf.readLine(); int len = str.length(); System.out.println("String lenght : " + len); } }

  • javakalel rahuman February 6, 2012 at 6:21 PM

    no cmd

  • Java - downcastingJayapal Reddy February 7, 2012 at 1:43 PM

    Create an abstract class with no methods. Derive a class and add a method. Create a static method that takes a reference to the base class, downcasts it to the derived class, and calls the method. In main( ), demonstrate that it works. Now put the abstract declaration for the method in the base class, thus eliminating the need for the downcast.

  • java developer..thanush.m February 10, 2012 at 1:31 PM

    simple program my mail send,, me,,, friend...

  • thank uR.devipriya January 19, 2013 at 1:27 PM

    need java full package from the basics i kindly request you to send mail to the above email id... from this i like to learn java fully

  • afvNwkFPsjiLucas January 19, 2013 at 6:23 PM

    Actually I really watend to make Phage Wars 2 Multiplayer but I didn't have the means to host a server. In the end I decided to focus on features instead of multiplayer.I would really like to revisit this game and add more RTS features as I think the Flash Industry needs a few more RTS games. I've done Multiplayer games in the past and this game gets more requests for multiplayer than any other. I definitely want to add a third but I think I will have to wait until Multiplayer is more of a possibility before doing so.

  • xjrSitQTlZSinrahenrianto January 19, 2013 at 4:07 PM

    above i think multi-player phage wars would be the best yet. although if you do make a phage wars 3 and it doesn't have multi-player i think the next best thing you could do would be to make a story line. seiothmng like an experimental drug has been injected into a human host and now has to take it over while combating obstacles like while blood cells and the lymph nodes and such. not THAT would make my day, but ether way you make some amazing games keep up the great work. also i think it would be cool to see like a player created map pack of demolition city, or more maps or seiothmng. that's a pretty fun game as well.

  • Core javaSHIKHA February 12, 2012 at 1:35 AM

    i have gone through then the tutorial of java and i felt that it is very much beneficial for the students who are beginning to study core java.

  • about c &c++shikha February 12, 2012 at 1:39 AM

    thanku for providing help but i want tto know that can u help us in c&c++ by providing such tutorials. if u can do this theni m very thankful to u.

  • javajelani basha February 14, 2012 at 11:05 AM

    what is the difference between an abstract class and interface

  • about java language in industriesgourav patil February 14, 2012 at 12:19 PM

    I am an engineering student of 3rd year. I am preaparing for java from next 2 semesters,I desided that I only prepare for java nothing else so it is good for me as java provide me aportunities in feture for jobs & if provides so what they are & in whose sector........

  • online registration Krishna February 16, 2012 at 3:07 PM

    Hi, i want to register for your different course provided online. kindly let me know how can i register and access the course. Regards, Krishna

  • Need help Sharan February 22, 2012 at 8:00 AM

    I need help in writing this. If anyone can help that would be appreciated. Implement a Singly Linked List in Java. Use this program to develop the following application. This application accepts from console and stores a list of 10 names of your friends in the Singly Linked List. The order of arrival of these names determines the sequence of names in the linked list. Implement a method that sorts the original sequence into a new sequence based on the alphabetical order of the names.

  • javamohan February 28, 2012 at 2:29 PM

    java

  • sms servershabeer March 8, 2012 at 4:50 PM

    how i can create a sms server in java that sends sms from a java desktop application to mobile phone using via a usb cable connction in mobile or messaging by bluetooth

  • ThanksAlexwhite March 10, 2012 at 7:19 PM

    Thanks for such nice tutorials. Helped me alot.

  • Java ProgrammingNiko Neal Farinas March 12, 2012 at 11:10 AM

    1. write a program that reads a number greater than or equal to 1000 from the user and prints it out with a comma separating the thousands. 2. then the reverse of it.. please i need it tommorow of a day after tommorow

  • JAVA Training Aadil Khan March 14, 2012 at 2:07 AM

    Hi There, I have completed my Engineering last year and I am very interested in becoming an Android Developer. I understand that for this I have to start with JAVA developors course which I was able to browse through your site. Can you send me more info on this course and the future prospects on getting into Android development. I would appreciate if you could let me knwo the training costs and also when the fresh batch starts. Thanks and I hope for an early response from you. Regards, Aadil Khan

  • javaSuresh March 14, 2012 at 1:00 PM

    nice tutorial

  • javaBhavya March 14, 2012 at 2:48 PM

    nice one

  • JAVA DEVELOPER NEEDS.sushmita shukla March 17, 2012 at 3:58 PM

    what must be a java developer need? requirements to become java developer?

  • javaK.Aswani March 20, 2012 at 12:14 PM

    This site is Excellent in learning.

  • javajayesh March 21, 2012 at 2:03 PM

    any

  • Java Help! Rita March 23, 2012 at 12:06 AM

    Hi, i really need somebody help help. i have tried so hard to program it but i just cant do it. model a student object. The student object has the following attributes: First_name, Last_name, Student_Id. // ways to identify each student 4 subjects and each subject will hold 10 marks Subject_one, mark0,mark1, mark2, mark3,mark4,mark5,mark6,mark7,mark8,mark9 Subject_two, mark0,mark1, mark2, mark3,mark4,mark5,mark6,mark7,mark8,mark9 Subject_three, mark0,mark1, mark2, mark3,mark4,mark5,mark6,mark7,mark8,mark9 Subject_four, mark0,mark1, mark2, mark3,mark4,mark5,mark6,mark7,mark8,mark9 Your methods for the student class must include but are not limited to: Get_first_name, Get_last_name, Get_Student_Id. // will print or return the data. Get_Subject_1, Get_Subject_2, Get_Subject_3, Get_Subject_4. Display_Subject_1, Display _Subject_2, Display _Subject_3, Display _Subject_4. Get_Subject_mark[specific mark] //will display the specified mark. Get_Subject_all_marks // will display all 10 marks and the subject name. Get_overall_average, // will get the average for all 40 marks. Get_Subject_average// will get the average for any 1 subject.

  • javathivja March 23, 2012 at 7:10 PM

    good

  • javaagilan March 25, 2012 at 12:35 PM

    i want project on college management system using java coding

  • Core java and Advanced javaImmi April 3, 2012 at 7:14 PM

    is it possible to learn core and advance java in 2 months time at an NIIT centre 2-3 hrs a day / 6 days a week?

  • classes and interfaces in javaMounika April 6, 2012 at 4:17 PM

    Im Unable to find all interfaces and classes of java through command prompt.. can any one, pls help me in tracing out.. i tried to type javap java.lang.* but it doesnt work.im able to see only methods in a class,,but how can i get intrfaces and classes..??

  • Need Solution For Below Qn.Manoj Kumar Patel April 17, 2012 at 10:15 AM

    Words in English are separated by delimiters such as colon (:), semi-colon (;), fullstop(.), question mark(?), space( ), hyphen(-), new line(\n), exclamation(!) and comma(,). In this problem, a java class MyDocument is present that has a method: Method 1: alphabetOccurrence (), counts number of occurrence of an alphabet. The Main Class demonstrates the use of MyDocument class. I need code to implement the below method: 1. alphabetOccurrence () Complete Program: import java.util.*; class Main { public static void main(String[] args) { MyDocument document = null; String text; text = "good morning. Good morning Alexander. How many people are there in your country? Do all of them have big houses, big cars? Do all of them eat good food?" ; char letter = 'd'; document = new MyDocument(); document.setDocumentText(text); System.out.println("Letter " + letter + " has occured " + document.alphabetOccurrence(letter) + " times"); } } class MyDocument { private ArrayList<Character> document = new ArrayList(); public MyDocument() { } void setDocumentText(String s) { for(int i = 0; i < s.length(); i++) document.add(s.charAt(i)); } ArrayList getDocumentText() { return this.document; } public int alphabetOccurrence(char letter){ return 0; } }

  • java shravankumar April 20, 2012 at 8:08 PM

    i feel happy with this thank you.

  • About siteGopal Mohata April 21, 2012 at 10:40 AM

    Rose India excellent site,My best site

  • JAVAPrincelin April 25, 2012 at 12:24 PM

    Kindly send me the updates

  • To upload contractor's tenders through my LTMandeep Kumar Jain April 27, 2012 at 9:05 AM

    Sir, I am in need to install into my lap top vide which I may be able to upload the tenders of various contractors on the site e-tenders.hry.nic.in for the works related to Haryana Irrigation Department. Thanks

  • about the details of projectsvrmurthy May 6, 2012 at 1:09 PM

    sir,we r doing "students admission in colleges" project wat is the requirements of this project please mail to me sir...

  • change in input methodologynazia ali May 7, 2012 at 12:26 PM

    plz give a discription along wid the programs so that beginners know that where are variables,.,.where are constructors,.,.etc etc,.,.

  • MCQmahesh May 10, 2012 at 3:18 PM

    i think roseindia provide MCQ.......

  • javaprakash June 12, 2012 at 11:48 AM

    what is the difference between getActionCommand() and getSource()

  • to know about javajenish patel June 17, 2012 at 4:33 PM

    hi, i am student of computer engg. i am in 1st year.i want to know that what is java??

  • javasavitha June 20, 2012 at 11:26 AM

    no comments

  • javaganga June 20, 2012 at 11:28 AM

    no idea

  • spend analysispalak June 20, 2012 at 6:27 PM

    hiiiiiiiiii My project is spend analysis. how to connect one page to another page ? like my 1st page is employee detail &there are one button ,when i click this button the next page page.

  • Java Jazz UpDeepak June 22, 2012 at 10:49 PM

    Dear Authors, Is the magazine is no more getting published? It is a good learning resource.

  • drawing shapesfafa June 28, 2012 at 2:28 PM

    I want a code for drawing several shapes with java

  • javaveenu June 29, 2012 at 12:18 PM

    j2ee concepts

  • core javaakanksha agarwal July 19, 2012 at 4:05 PM

    sir i want source code of online examination test.. m unable to get it.. so plz help me.. i hav 2 submit my project....

  • JavaG.Srinivasarao July 20, 2012 at 2:54 PM

    to find the Sum of first natural numbers?

  • like it sajjad July 31, 2012 at 12:48 PM

    the best site in field of java i get very nice info thanks................................

  • my qustionstephen August 1, 2012 at 1:35 PM

    why using java programming

  • javaMohd Arshad August 4, 2012 at 1:49 PM

    it's very helpfull.

  • java projectsarthak pandya August 6, 2012 at 9:04 AM

    i am doing java project so how can i started with it

  • core javadinesh August 7, 2012 at 12:21 PM

    matrix program

  • JavaDivya August 16, 2012 at 2:52 PM

    Nice materials

  • about .jar filesjeevan August 21, 2012 at 12:45 PM

    please put the .jar files and tell me how to create .jar file with meta-inf.

  • popopopo August 21, 2012 at 3:45 PM

    import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; public class Main { public static void main(String[] args) { try { // Set cross-platform Java L&F (also called "Metal") UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (UnsupportedLookAndFeelException e) { // handle exception } catch (ClassNotFoundException e) { // handle exception } catch (InstantiationException e) { // handle exception } catch (IllegalAccessException e) { // handle exception } javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { new WellForm(); // Create and show the GUI. } }); } } ______________________________________________________________________________________________________________________- import java.awt.BasicStroke; import java.awt.Color; import java.awt.FontMetrics; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Point; import java.awt.RenderingHints; import java.awt.color.CMMException; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.geom.Ellipse2D; import java.awt.geom.Line2D; import java.awt.geom.Rectangle2D; import java.text.DecimalFormat; import java.util.ArrayList; import javax.swing.JPanel; public class Canvas extends JPanel implements MouseMotionListener, MouseListener { private ArrayList<WellData> wellList; int selectIndex; Double valuesOfX[], valuesOfY[], propertyArray[]; int majorTics = 10, minorTics = 5; //double yTicsIncrValue = 0, xTicsIncrValue = 0; double height, width, leftInsect, bottomInsect; double pressX; double pressY; double releaseX; double releaseY; double draggedX; double draggedY; Graphics2D g2d; Rectangle2D.Double clipRectangle; double xMin, xMax, yMin, yMax; // double xMinTest, xMaxTest, yMinTest, yMaxTest; // private Point point = null, pressedPt = null, releasedPt = null; //private boolean isZoom = false, isDragged = false; public Canvas() { repaint(); } public void setWellList(ArrayList<WellData> wellList) { this.wellList = wellList; addMouseMotionListener(this); addMouseListener(this); initVal(); } public void setSelectIndex(int selectIndex) { this.selectIndex = selectIndex; } private void initVal() { valuesOfX = new Double[wellList.size()]; valuesOfY = new Double[wellList.size()]; for (int j = 0; j < wellList.size(); j++) { valuesOfX[j] = wellList.get(j).getX(); valuesOfY[j] = wellList.get(j).getY(); } xMin = getMin(valuesOfX); xMax = getMax(valuesOfX); yMin = getMin(valuesOfY); yMax = getMax(valuesOfY); } @Override protected void paintComponent(Graphics g) { super.paintComponent(g); g2d = (Graphics2D) g; if (wellList != null) { propertyArray = new Double[wellList.size()]; // valuesOfX = new Double[wellList.size()]; // valuesOfY = new Double[wellList.size()]; double radius = 0, x = 0, y = 0; height = this.getHeight(); width = this.getWidth(); leftInsect = width / 20; bottomInsect = height / 10; clipRectangle = new Rectangle2D.Double(leftInsect, bottomInsect, width - leftInsect * 2, height - bottomInsect * 2); g2d.draw(clipRectangle); g2d.setClip(clipRectangle); for (int j = 0; j < wellList.size(); j++) { propertyArray[j] = wellList.get(j).getProperty() .get(selectIndex); } // for (int j = 0; j < wellList.size(); j++) { // valuesOfX[j] = wellList.get(j).getX(); // } // for (int j = 0; j < wellList.size(); j++) { // valuesOfY[j] = wellList.get(j).getY(); // } for (int i = 0; i < wellList.size(); i++) { radius = (propertyArray[i] * getPropertyFactor()) * 500; double factorX = (clipRectangle.getWidth()) / (xMax - xMin); double factorY = (clipRectangle.getHeight()) / (yMax - yMin); x = clipRectangle.getX() + ((wellList.get(i).getX() - xMin) * factorX); y = (getHeight() - clipRectangle.getY()) - ((wellList.get(i).getY() - yMin) * factorY); Ellipse2D.Double circle = new Ellipse2D.Double(x - radius / 2, y - radius / 2, radius, radius); if (selectIndex == 0) { g2d.setPaint(Color.RED); } if (selectIndex == 1) { g2d.setPaint(Color.MAGENTA); } if (selectIndex == 2) { g2d.setPaint(Color.BLUE); } g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.draw(circle); g2d.setPaint(Color.BLACK); g2d.fill(new Ellipse2D.Double((x), (y), 3, 3)); g2d.drawString(wellList.get(i).getWellName(), (float) (x), (float) (y)); } g2d.draw(new Rectangle2D.Double(pressX, pressY, draggedX - pressX, draggedY - pressY)); // margin Lines // g2d.setPaint(Color.BLACK); // // X-axis // g2d.draw(new Line2D.Double(leftInsect, (height - // bottomInsect), // width, (height - bottomInsect))); // // //Y-axis // g2d.draw(new Line2D.Double(leftInsect, 0, leftInsect, // (height - bottomInsect))); g2d.setClip(null); g2d.setStroke(new BasicStroke(1.5f)); xTics(); yTics(); } } void yTics() { double yTicsIncrValue = 0; for (int t = 1; t <= majorTics; t++) { // g2d.setPaint(Color.BLACK); // g2d.draw(new Line2D.Double(leftInsect - 10, bottomInsect // + (yTicsIncrValue * getFactorY()), leftInsect + 10, // bottomInsect + (yTicsIncrValue * getFactorY()))); // // DecimalFormat formatter = new DecimalFormat("#0.000"); // g2d.setPaint(Color.MAGENTA); // g2d.drawString( // /* "Tic: " +(10-t) + */" " // + formatter.format((yMin + yTicsIncrValue)), // (float) (leftInsect - 45), // // (float) (clipRectangle.getMaxY() - yTicsIncrValue // * getFactorY())); // // yTicsIncrValue = yTicsIncrValue + (yMax - yMin) / (majorTics - // 1); /*************************************/ double factorY = (clipRectangle.getHeight()) / (yMax - yMin); g2d.setPaint(Color.BLACK); g2d.draw(new Line2D.Double(leftInsect - 10, bottomInsect + (yTicsIncrValue * factorY), leftInsect + 10, bottomInsect + (yTicsIncrValue * factorY))); DecimalFormat formatter = new DecimalFormat("#0.000"); g2d.setPaint(Color.MAGENTA); g2d.drawString( /* "Tic: " +(10-t) + */" " + formatter.format((yMin + yTicsIncrValue)), (float) (leftInsect - 45), (float) (clipRectangle.getMaxY() - yTicsIncrValue * factorY)); yTicsIncrValue = yTicsIncrValue + (yMax - yMin) / (majorTics - 1); /**************************************/ } } void xTics() { double xTicsIncrValue = 0; for (int t = 1; t <= majorTics; t++) { // g2d.setPaint(Color.BLACK); // g2d.draw(new Line2D.Double(leftInsect + xTicsIncrValue // * getFactorX(), height - bottomInsect - 10, leftInsect // + xTicsIncrValue * getFactorX(), height - bottomInsect + 10)); // // DecimalFormat formatter = new DecimalFormat("#0.000"); // g2d.setPaint(Color.GRAY); // g2d.drawString(" " + formatter.format((xMin + xTicsIncrValue)), // (float) (leftInsect + xTicsIncrValue * getFactorX()), // (float) (clipRectangle.getMaxY() + 40)); // // xTicsIncrValue = xTicsIncrValue + (xMax - xMin) / (majorTics - // 1); /*********************/ double factorX = (clipRectangle.getWidth()) / (xMax - xMin); g2d.setPaint(Color.BLACK); g2d.draw(new Line2D.Double(leftInsect + xTicsIncrValue * factorX, height - bottomInsect - 10, leftInsect + xTicsIncrValue * (factorX), height - bottomInsect + 10)); DecimalFormat formatter = new DecimalFormat("#0.000"); g2d.setPaint(Color.GRAY); g2d.drawString(" " + formatter.format((xMin + xTicsIncrValue)), (float) (leftInsect + xTicsIncrValue * factorX), (float) (clipRectangle.getMaxY() + 40)); xTicsIncrValue = xTicsIncrValue + (xMax - xMin) / (majorTics - 1); /*********************/ } } Double getMax(Double arr[]) { Double max, arrayX[] = arr; max = arrayX[0]; for (int i = 1; i < arrayX.length; i++) { if (arrayX[i] >= max) { max = arrayX[i]; } } return max; } Double getMin(Double arr[]) { Double min, arrayX[] = arr; min = arrayX[0]; for (int i = 1; i < arrayX.length; i++) { if (arrayX[i] <= min) { min = arrayX[i]; } } return min; } Double getFactorX() { Double maxX, minX; Double factorX = null; maxX = getMax(valuesOfX); minX = getMin(valuesOfX); factorX = (clipRectangle.getWidth()) / (maxX - minX); return factorX; } Double getFactorY() { Double maxY, minY, factorY = null; maxY = getMax(valuesOfY); minY = getMin(valuesOfY); factorY = (clipRectangle.getHeight()) / (maxY - minY); return factorY; } Double getPropertyFactor() { Double max, min, factor = null; max = getMax(propertyArray); min = getMin(propertyArray); factor = (clipRectangle.getWidth()) / (max - min); return factor / 10000; } @Override public void mouseClicked(MouseEvent e) { // System.out.println("mouseClicked"); } @Override public void mousePressed(MouseEvent e) { pressX = e.getX(); pressY = e.getY(); System.out.println("mouse press X-- "+((((e.getX()-clipRectangle.getX()))/getFactorX())+xMin)); System.out.println("mouse press y-- "+((((getHeight()-e.getY()-clipRectangle.getY())/getFactorY()))+yMin)); } @Override public void mouseReleased(MouseEvent e) { releaseX = e.getX(); releaseY = e.getY(); if(pressX<releaseX) { xMin=(((pressX-clipRectangle.getX()))/getFactorX())+xMin; yMax=(((getHeight()-pressY-clipRectangle.getY())/getFactorY()))+yMin; xMax=(((releaseX-clipRectangle.getX()))/getFactorX())+xMin; yMin=(((getHeight()-releaseY-clipRectangle.getY())/getFactorY()))+yMin; } else { xMin = getMin(valuesOfX); xMax = getMax(valuesOfX); yMin = getMin(valuesOfY); yMax = getMax(valuesOfY); } repaint(); } @Override public void mouseEntered(MouseEvent e) { // System.out.println("mouseEntered"); } @Override public void mouseExited(MouseEvent e) { // System.out.println("mouseExited"); } @Override public void mouseDragged(MouseEvent e) { draggedX = e.getX(); draggedY = e.getY(); repaint(); } @Override public void mouseMoved(MouseEvent e) { } } ________________________________________________________________________________________________________________________ import java.util.ArrayList; public class WellData { private String wellName; private double x; private double y; private ArrayList<Double> property; public double getX() { return x; } public double getY() { return y; } public ArrayList<Double> getProperty() { return property; } public void setProperty(ArrayList<Double> property) { this.property = property; } public String getWellName() { return wellName; } public void setX(double x) { this.x = x; } public void setY(double y) { this.y = y; } public void setWellName(String wellName) { this.wellName = wellName; } } ________________________________________________________________________________________________________________________ import java.awt.BorderLayout; import java.awt.Color; import java.awt.Container; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.util.ArrayList; import java.util.StringTokenizer; import javax.swing.JComboBox; import javax.swing.JFileChooser; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JPanel; public class WellForm implements ActionListener { JFrame frame; Container con; /*** menu item for reading well data */ JMenuItem wellData; WellData well; Canvas canvas; ArrayList<WellData> wellList; JComboBox<String> cmbProperty; ArrayList<Double> property; public WellForm() { createGUI(); importFile(); } void createGUI() { frame = new JFrame("2D"); // creating menu JMenuBar menuBar = new JMenuBar(); JMenu importMenu = new JMenu("Import"); wellData = new JMenuItem("Well Data"); importMenu.add(wellData); menuBar.add(importMenu); frame.setJMenuBar(menuBar); // creating property panel with label and combo JPanel northPanel = new JPanel(); JLabel lbProperty = new JLabel("Select Property"); // property = null; cmbProperty = new JComboBox<String>(); cmbProperty.setEnabled(false); cmbProperty.setActionCommand("Property_Name"); northPanel.add(lbProperty); northPanel.add(cmbProperty); // creating canvas panel canvas = new Canvas(); canvas.setBackground(Color.white); con = frame.getContentPane(); canvas.setFocusable(true); con.add(canvas, BorderLayout.CENTER); con.add(northPanel, BorderLayout.NORTH); frame.setVisible(true); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setExtendedState(JFrame.MAXIMIZED_BOTH); } private void importFile() { wellData.addActionListener(this); cmbProperty.addActionListener(this); } @Override public void actionPerformed(ActionEvent e) { if (e.getActionCommand().equals("Well Data")) { wellList = new ArrayList<WellData>(); JFileChooser chooser = new JFileChooser(); int returnVal = chooser.showOpenDialog(null); if (returnVal == JFileChooser.APPROVE_OPTION) { File f = chooser.getSelectedFile(); BufferedReader br; try { br = new BufferedReader(new FileReader(f)); String st = ""; int counter = 1; while ((st = br.readLine()) != null) { counter++; StringTokenizer stringTokenizer = new StringTokenizer( st); if (counter >= 5 && counter < 8) { for (int i = 0; i < 3; i++) { while (stringTokenizer.hasMoreTokens()) { cmbProperty.addItem(stringTokenizer .nextToken()); } } } if (counter >= 8) { well = new WellData(); property = new ArrayList<Double>(); for (int i = 0; i <= stringTokenizer.countTokens(); i++) { while (stringTokenizer.hasMoreTokens()) { well.setWellName(stringTokenizer .nextToken()); well.setX(Double .parseDouble(stringTokenizer .nextToken())); well.setY(Double .parseDouble(stringTokenizer .nextToken())); property.add(Double .parseDouble(stringTokenizer .nextToken()));// property1 property.add(Double .parseDouble(stringTokenizer .nextToken()));// property2 property.add(Double .parseDouble(stringTokenizer .nextToken()));// property3 well.setProperty(property); wellList.add(well); cmbProperty.setEnabled(true); } } } } canvas.setWellList(wellList); } catch (Exception ae) { ae.printStackTrace(); } } }// end if if (e.getActionCommand().equals("Property_Name")) { int c = cmbProperty.getSelectedIndex(); canvas.setSelectIndex(c); canvas.removeAll(); canvas.repaint(); } } }

  • javaArav Kumar August 24, 2012 at 8:33 PM

    what is API?

  • java nandhini September 5, 2012 at 6:10 PM

    hi i want to know notes on stub,skeleton pls give me answer

  • javazaid September 9, 2012 at 2:40 PM

    I have downloaded a project on library management system in core java and it is also working but it is not connecting with database which is with jdbc and odbc. An exception is coming which is java.sql.SQLException:[Microsoft][ODBC Driver Manager] The specified DNS contains an architecture mismatch between the Driver and Application

  • javaMadhusudhan September 13, 2012 at 10:59 PM

    How to searh for learning java audio and video files, pls send me the java audio files i required.

  • java detailsselvapriya.c September 25, 2012 at 1:59 PM

    hello sir, i need file transfering program using java immediately.can u send?

  • hichandra kanth September 26, 2012 at 9:40 PM

    this website is good for me

  • binary search tree (java)violet December 15, 2012 at 11:08 PM

    Hi, please i need some help to write code about binary search tree to do this : print the lowest common ancestor between two nodes V and W, it can be defined as the lowest node T that has V and W as descendants.(public static void printLCA(int x,int y) )

  • Display percentage value in Pie Chartsofian December 7, 2012 at 11:35 PM

    I did the coding to create a pie chart file in png format file, the pie chart shows the percentage but in the bottom of the file, I want the percentage to appear in the chart itself, This is the codes I have used, String query = "SELECT name,flag from mawarid"; JDBCPieDataset dataset = new JDBCPieDataset( "jdbc:oracle:thin:@ 127.0.0.1:1521:XE", "oracle.jdbc.OracleDriver", "", ""); dataset.executeQuery(query); JFreeChart chart = ChartFactory.createPieChart("Test", dataset, true, true, false); try{ PiePlot plot = (PiePlot) chart.getPlot(); plot.setLegendLabelGenerator(new StandardPieSectionLabelGenerator("{0} {2}")); final ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection()); final File file1 = new File("Chart5.png"); ChartUtilities.saveChartAsPNG(file1, chart,600 , 400,info); } catch(Exception e) { }

  • classkamrul December 8, 2012 at 7:37 PM

    when give the error following the code: public class AddPersonPanel extends JFrame implements ActionListener{} This error is: package name.class name is not abstract & does not override abstract method actionPerformed

  • http://www.xgpwatches.com/breitlingbreitling replica September 28, 2012 at 11:29 AM

    First of all the idea of the Hoplink, while brilliant, is fundamentally flawed. It fails to take into account of the fact that we as humans, are generally unable to remember large strings of meaningless letters and numbers. If you which to successfully send a link to a prospect, I advise you to use a proper website address and set that address to auto redirect. Not only will it be instantly more memorable but also inspires a far higher degree of confidence in people viewing your link.

  • javarajan December 11, 2012 at 12:38 PM

    super

  • Help 4 projectLovely Lalit October 4, 2012 at 12:23 PM

    WE NEED UR HELP REGARDING OUR FINAL YERA PROJECT

  • Trainingbalogun adewale October 6, 2012 at 1:35 PM

    please i want to confirm if you train students in Java, and other software development programs. I live in Nigeria. Thanks Wale

  • javareza October 9, 2012 at 12:03 PM

    I want to write a program in java that convert color image to grayscale,I used "average( RGB )algorithm", but I'm new in java.would you help me?

  • java basicsgopi krishnan December 12, 2012 at 6:32 PM

    i would like to know java

  • InformationDharmvir Kumar October 13, 2012 at 1:53 PM

    when jsp makes servlet then why makes servlet? Plz send me answer on my email id:

  • code and definition sruthi October 19, 2012 at 12:46 PM

    1)code for generating selective jamming attach using packets. 2)what is selective jamming and jamming attach using packets.

  • How To download full java tutorialsvalavan s October 23, 2012 at 7:11 PM

    Hai, Am using your website to learn java. but i want to download the full collection of your tutorial.. Is its possible to download your full collection of tutorials.. if possible, how can i download the tutorials?...

  • Core JavaMaharshi October 24, 2012 at 12:36 PM

    I Like Java

  • OAENjuYvdDCJLzQPMkqNjush October 27, 2012 at 2:14 AM

    I'm not as big of fan of Rosetta Stone as many people here. Unforgettable Languages did the trick for me, I saw them on NBC nhlgtiy news one night and got their Italian online course, they use a scientific memory method called Linkword and TRUST me it worked well for this dumb Southerner! Oh and they tout themselves as being the fastest way to learn ANY Language think they are cheaper than Rosetta tooHere is the French Free Demo and Information LinkHere is the Spanish Free Demo and Information LinkGood Luck

  • javamithun November 5, 2012 at 1:55 PM

    it is very simple to learn kava

  • need programming helpRenu November 11, 2012 at 5:44 PM

    hai can any one help me ? task : To define a function which looks like my_func(input_db, output_directory). it has to be robust and: Check if there are any matching NS**** or T**** files existing. Only for those files the function has to be executed! All results should be stored inside a user-definable directory. The function should print out how many data sets were found and how many data sets were processed.

  • java expertaravind November 16, 2012 at 12:58 PM

    nice

  • javaBhuvana.k November 23, 2012 at 2:53 PM

    i learn quickly and clearly thank for your help

  • javaSoumya November 26, 2012 at 3:34 PM

    I want to create a java application where computer speaks what i type..how do i start with?

  • javariyaz ali November 28, 2012 at 5:33 PM

    i like your programe very much

  • javaJav November 29, 2012 at 2:25 AM

    I am trying the run this code in eclipse, but there seem to be some nuances. Can yo please run it for me and and let me know why is it not running? Instruction: Write a java applet that does the following functions based on a hard coded variable named "play". When play = 1 draw one blue circle on the right and display the following text below the circle on the left hand side: "If all our misfortunes were laid in one common heap, whence everyone must take an equal portion, most people would be content to take their own and depart." -- Socrates Code: import java.applet.Applet; import java.awt.*; public class play extends Applet { public void paint(Graphics g) { int play = 1; // value of play variable { int count = 1; // initialize count while (count < 2 ) // run while loop if count is less than 2 if (play == 1) // if the value of play equals 1, then do this { g.setColor(Color.blue); // set color to blue g.fillOval(250, 10, 100, 100); // filled circle g.setColor(Color.black); // set color to black g.drawString ("\"If all our misfortunes were laid in one", 10, 150); // quote g.drawString ("common heap, whence everyone must", 10, 165); // quote g.drawString ("take an equal portion, most people would\"", 10, 180); // quote g.drawString ("be content to take their own and depart.\"", 10, 195); // quote g.drawString("-- Socrates", 10, 210); // quote count = count + 1; // increment count by 1 } // end if else if (play == 2) // if the value of play equals 2, then do this { g.setColor(Color.green); // set color to green g.fillRect(250, 30, 40, 100); // 40 by 100 rectangle g.fillRect(300, 30, 40, 100); // 40 by 100 rectangle g.setColor(Color.black); // set color to black g.drawString ("\"There are only two ways to live your life.", 10, 160); // quote g.drawString ("One is as though nothing is a miracle.", 10, 175); // quote g.drawString(" The other is as though everything is a miracle.\"", 10, 190); // quote g.drawString("--Albert Einstein", 10, 205); // quote count = count + 1; // increment count by 1 } // end else if else if (play == 3) // if the value of play equals 3, then do this { g.setColor(Color.lightGray); // set color to light gray g.drawLine(250, 10, 320, 10); // line 70 pixels g.drawLine(250, 15, 320, 15); // line 70 pixels g.drawLine(250, 20, 320, 20); // line 70 pixels g.setColor(Color.black); // set color to black g.drawString ("\"We are like butterflies who flutter for a day", 10, 60); // quote g.drawString ("and think it's forever.\"", 10, 75); // quote g.drawString("--Carl Sagan", 10, 90); // quote count = count + 1; // increment count by 1 } // end else if else if (play <= 100) // if the value of play less than or equal to 100, then do this // if play were 1, 2, 3, then they would have been processed above { System.out.println ("\n\"I haven't failed, I've found 10,000 ways that don't work.\""); // quote System.out.println("--Thomas Edison"); // quote count = count + 1; // increment count by 1 } // end else if else if (play > 100 && play <=1000) // if the value of play is greater than 100 and less than or equal to 1000, then do this { System.out.println ("\n\"Any science or technology which is sufficiently \nadvanced is indistinguishable from magic.\""); // quote System.out.println("--Arthur C. Clarke"); // quote count = count + 1; // increment count by 1 } // end else if else // if the value of play has not been addressed already, then do this { System.out.println ("\nSorry, Value is out of Range!"); // quote System.out.println("--Amy Krug"); // quote count = count + 1; // increment count by 1 } // end else } } }

  • javagreat November 29, 2012 at 2:27 AM

    I am trying the run this code in eclipse, but there seem to be some nuances. Can yo please run it for me and and let me know why is it not running? Instruction: Write a java applet that does the following functions based on a hard coded variable named "play". When play = 1 draw one blue circle on the right and display the following text below the circle on the left hand side: "If all our misfortunes were laid in one common heap, whence everyone must take an equal portion, most people would be content to take their own and depart." -- Socrates Code: import java.applet.Applet; import java.awt.*; public class play extends Applet { public void paint(Graphics g) { int play = 1; // value of play variable { int count = 1; // initialize count while (count < 2 ) // run while loop if count is less than 2 if (play == 1) // if the value of play equals 1, then do this { g.setColor(Color.blue); // set color to blue g.fillOval(250, 10, 100, 100); // filled circle g.setColor(Color.black); // set color to black g.drawString ("\"If all our misfortunes were laid in one", 10, 150); // quote g.drawString ("common heap, whence everyone must", 10, 165); // quote g.drawString ("take an equal portion, most people would\"", 10, 180); // quote g.drawString ("be content to take their own and depart.\"", 10, 195); // quote g.drawString("-- Socrates", 10, 210); // quote count = count + 1; // increment count by 1 } // end if else if (play == 2) // if the value of play equals 2, then do this { g.setColor(Color.green); // set color to green g.fillRect(250, 30, 40, 100); // 40 by 100 rectangle g.fillRect(300, 30, 40, 100); // 40 by 100 rectangle g.setColor(Color.black); // set color to black g.drawString ("\"There are only two ways to live your life.", 10, 160); // quote g.drawString ("One is as though nothing is a miracle.", 10, 175); // quote g.drawString(" The other is as though everything is a miracle.\"", 10, 190); // quote g.drawString("--Albert Einstein", 10, 205); // quote count = count + 1; // increment count by 1 } // end else if else if (play == 3) // if the value of play equals 3, then do this { g.setColor(Color.lightGray); // set color to light gray g.drawLine(250, 10, 320, 10); // line 70 pixels g.drawLine(250, 15, 320, 15); // line 70 pixels g.drawLine(250, 20, 320, 20); // line 70 pixels g.setColor(Color.black); // set color to black g.drawString ("\"We are like butterflies who flutter for a day", 10, 60); // quote g.drawString ("and think it's forever.\"", 10, 75); // quote g.drawString("--Carl Sagan", 10, 90); // quote count = count + 1; // increment count by 1 } // end else if else if (play <= 100) // if the value of play less than or equal to 100, then do this // if play were 1, 2, 3, then they would have been processed above { System.out.println ("\n\"I haven't failed, I've found 10,000 ways that don't work.\""); // quote System.out.println("--Thomas Edison"); // quote count = count + 1; // increment count by 1 } // end else if else if (play > 100 && play <=1000) // if the value of play is greater than 100 and less than or equal to 1000, then do this { System.out.println ("\n\"Any science or technology which is sufficiently \nadvanced is indistinguishable from magic.\""); // quote System.out.println("--Arthur C. Clarke"); // quote count = count + 1; // increment count by 1 } // end else if else // if the value of play has not been addressed already, then do this { System.out.println ("\nSorry, Value is out of Range!"); // quote System.out.println("--Amy Krug"); // quote count = count + 1; // increment count by 1 } // end else } } }

  • javaone November 29, 2012 at 2:29 AM

    I am trying the run this code in eclipse, but there seem to be some nuances. Can yo please run it for me and and let me know why is it not running? Instruction: Write a java applet that does the following functions based on a hard coded variable named "play". When play = 1 draw one blue circle on the right and display the following text below the circle on the left hand side: "If all our misfortunes were laid in one common heap, whence everyone must take an equal portion, most people would be content to take their own and depart." -- Socrates Code: import java.applet.Applet; import java.awt.*; public class play extends Applet { public void paint(Graphics g) { int play = 1; // value of play variable { int count = 1; // initialize count while (count < 2 ) // run while loop if count is less than 2 if (play == 1) // if the value of play equals 1, then do this { g.setColor(Color.blue); // set color to blue g.fillOval(250, 10, 100, 100); // filled circle g.setColor(Color.black); // set color to black g.drawString ("\"If all our misfortunes were laid in one", 10, 150); // quote g.drawString ("common heap, whence everyone must", 10, 165); // quote g.drawString ("take an equal portion, most people would\"", 10, 180); // quote g.drawString ("be content to take their own and depart.\"", 10, 195); // quote g.drawString("-- Socrates", 10, 210); // quote count = count + 1; // increment count by 1 } // end if else if (play == 2) // if the value of play equals 2, then do this { g.setColor(Color.green); // set color to green g.fillRect(250, 30, 40, 100); // 40 by 100 rectangle g.fillRect(300, 30, 40, 100); // 40 by 100 rectangle g.setColor(Color.black); // set color to black g.drawString ("\"There are only two ways to live your life.", 10, 160); // quote g.drawString ("One is as though nothing is a miracle.", 10, 175); // quote g.drawString(" The other is as though everything is a miracle.\"", 10, 190); // quote g.drawString("--Albert Einstein", 10, 205); // quote count = count + 1; // increment count by 1 } // end else if else if (play == 3) // if the value of play equals 3, then do this { g.setColor(Color.lightGray); // set color to light gray g.drawLine(250, 10, 320, 10); // line 70 pixels g.drawLine(250, 15, 320, 15); // line 70 pixels g.drawLine(250, 20, 320, 20); // line 70 pixels g.setColor(Color.black); // set color to black g.drawString ("\"We are like butterflies who flutter for a day", 10, 60); // quote g.drawString ("and think it's forever.\"", 10, 75); // quote g.drawString("--Carl Sagan", 10, 90); // quote count = count + 1; // increment count by 1 } // end else if else if (play <= 100) // if the value of play less than or equal to 100, then do this // if play were 1, 2, 3, then they would have been processed above { System.out.println ("\n\"I haven't failed, I've found 10,000 ways that don't work.\""); // quote System.out.println("--Thomas Edison"); // quote count = count + 1; // increment count by 1 } // end else if else if (play > 100 && play <=1000) // if the value of play is greater than 100 and less than or equal to 1000, then do this { System.out.println ("\n\"Any science or technology which is sufficiently \nadvanced is indistinguishable from magic.\""); // quote System.out.println("--Arthur C. Clarke"); // quote count = count + 1; // increment count by 1 } // end else if else // if the value of play has not been addressed already, then do this { System.out.println ("\nSorry, Value is out of Range!"); // quote System.out.println("--Amy Krug"); // quote count = count + 1; // increment count by 1 } // end else } } }

  • javaone November 29, 2012 at 2:34 AM

    I am trying the run this code in eclipse, but there seem to be some nuances. Can yo please run it for me and and let me know why is it not running? Instruction: Write a java applet that does the following functions based on a hard coded variable named "play". When play = 1 draw one blue circle on the right and display the following text below the circle on the left hand side: "If all our misfortunes were laid in one common heap, whence everyone must take an equal portion, most people would be content to take their own and depart." -- Socrates Code: import java.applet.Applet; import java.awt.*; public class play extends Applet { public void paint(Graphics g) { int play = 1; // value of play variable { int count = 1; // initialize count while (count < 2 ) // run while loop if count is less than 2 if (play == 1) // if the value of play equals 1, then do this { g.setColor(Color.blue); // set color to blue g.fillOval(250, 10, 100, 100); // filled circle g.setColor(Color.black); // set color to black g.drawString ("\"If all our misfortunes were laid in one", 10, 150); // quote g.drawString ("common heap, whence everyone must", 10, 165); // quote g.drawString ("take an equal portion, most people would\"", 10, 180); // quote g.drawString ("be content to take their own and depart.\"", 10, 195); // quote g.drawString("-- Socrates", 10, 210); // quote count = count + 1; // increment count by 1 } // end if else if (play == 2) // if the value of play equals 2, then do this { g.setColor(Color.green); // set color to green g.fillRect(250, 30, 40, 100); // 40 by 100 rectangle g.fillRect(300, 30, 40, 100); // 40 by 100 rectangle g.setColor(Color.black); // set color to black g.drawString ("\"There are only two ways to live your life.", 10, 160); // quote g.drawString ("One is as though nothing is a miracle.", 10, 175); // quote g.drawString(" The other is as though everything is a miracle.\"", 10, 190); // quote g.drawString("--Albert Einstein", 10, 205); // quote count = count + 1; // increment count by 1 } // end else if else if (play == 3) // if the value of play equals 3, then do this { g.setColor(Color.lightGray); // set color to light gray g.drawLine(250, 10, 320, 10); // line 70 pixels g.drawLine(250, 15, 320, 15); // line 70 pixels g.drawLine(250, 20, 320, 20); // line 70 pixels g.setColor(Color.black); // set color to black g.drawString ("\"We are like butterflies who flutter for a day", 10, 60); // quote g.drawString ("and think it's forever.\"", 10, 75); // quote g.drawString("--Carl Sagan", 10, 90); // quote count = count + 1; // increment count by 1 } // end else if else if (play <= 100) // if the value of play less than or equal to 100, then do this // if play were 1, 2, 3, then they would have been processed above { System.out.println ("\n\"I haven't failed, I've found 10,000 ways that don't work.\""); // quote System.out.println("--Thomas Edison"); // quote count = count + 1; // increment count by 1 } // end else if else if (play > 100 && play <=1000) // if the value of play is greater than 100 and less than or equal to 1000, then do this { System.out.println ("\n\"Any science or technology which is sufficiently \nadvanced is indistinguishable from magic.\""); // quote System.out.println("--Arthur C. Clarke"); // quote count = count + 1; // increment count by 1 } // end else if else // if the value of play has not been addressed already, then do this { System.out.println ("\nSorry, Value is out of Range!"); // quote System.out.println("--Amy Krug"); // quote count = count + 1; // increment count by 1 } // end else } } }

  • appletsandeep singh December 5, 2012 at 12:04 PM

    sir, I want to know how to use an applet and what are its various features and advantages

  • want answersameer March 7, 2013 at 8:22 AM

    program to print the 9th number that is both prime and also belongs to the Fibonacci series

  • pls answer itSameer March 7, 2013 at 8:25 AM

    program to print the 9th number that is both prime and also belongs to the Fibonacci series

  • doubt regording threadrathnakar March 7, 2013 at 2:21 PM

    why wait(), notify(), notifyall() placed in object class why not in thread class please give proper explanation about this

  • javaavdhesh kumar patsariya April 3, 2013 at 11:40 AM

    java nots

  • javavani April 9, 2013 at 8:52 AM

    what is complete description n meaning and use of abstract method?

  • Thank yousijinmary April 12, 2013 at 8:51 AM

    r u give code for following algorithm steps

  • using swing in javasadhna April 13, 2013 at 1:49 PM

    how to seprate login registration nd student registration in java using swing

  • core javaNagarjuna D April 17, 2013 at 6:51 PM

    i wnt core java

  • plz is program ko mouse events k lea teek krdypakeeza April 24, 2013 at 1:10 AM

    import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import java.awt.event.MouseListener; import javax.swing.*; import org.w3c.dom.events.MouseEvent; import java.awt.event.MouseListener; public class mouseEvent implements MouseListener { JLabel l; JTextField tf; public void mouseEvent() { JFrame f=new JFrame(); JPanel p=new JPanel(); l=new JLabel("Name"); tf=new JTextField("Name"); p.add(l); p.add(tf); f.add(p); tf.addMouseListener(new MouseListener(){ public void itemStateChanged(ItemEvent ie){ } public void mouseClicked(MouseEvent arg0) { // TODO Auto-generated method stub } //@Override public void mouseEntered(MouseEvent arg0) { // TODO Auto-generated method stub } //@Override public void mouseExited(MouseEvent arg0) { // TODO Auto-generated method stub } //@Override public void mousePressed(MouseEvent arg0) { // TODO Auto-generated method stub } //@Override public void mouseReleased(MouseEvent arg0) { // TODO Auto-generated method stub } @Override public void mouseClicked(java.awt.event.MouseEvent arg0) { // TODO Auto-generated method stub } @Override public void mouseEntered(java.awt.event.MouseEvent arg0) { // TODO Auto-generated method stub } @Override public void mouseExited(java.awt.event.MouseEvent arg0) { // TODO Auto-generated method stub } @Override public void mousePressed(java.awt.event.MouseEvent arg0) { // TODO Auto-generated method stub } @Override public void mouseReleased(java.awt.event.MouseEvent arg0) { // TODO Auto-generated method stub } }); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.setSize(400,400); f.setVisible(true); } public static void main(String arg[]) { mouseEvent me=new mouseEvent(); } @Override public void mouseClicked(java.awt.event.MouseEvent arg0) { // TODO Auto-generated method stub } @Override public void mouseEntered(java.awt.event.MouseEvent arg0) { // TODO Auto-generated method stub } @Override public void mouseExited(java.awt.event.MouseEvent arg0) { // TODO Auto-generated method stub } @Override public void mousePressed(java.awt.event.MouseEvent arg0) { // TODO Auto-generated method stub } @Override public void mouseReleased(java.awt.event.MouseEvent arg0) { // TODO Auto-generated method stub } }

  • Tomcat installation in windows ServerShivashankar April 24, 2013 at 7:41 AM

    Hi good morning, As I installed Apache Tomcat 5.5 in windows server(Admin). Now the problem is that only one user can run a program on tomcat server at a time, that multi users not able to run a program simultaneously. Please give some solution to above problem ASAP. Thanks you in advance. Kind Regards, Shivashankar

  • advance javakrystoff May 3, 2013 at 6:19 AM

    1. Implement the Queue class using java collection classes. 2. The following methods must be implemented. public void enqueue(Object o); public Object dequeue(); public Object front(); public boolean isEmpty(); public void clear(); 3. Name you file Queue.java. /* for our latest activity...im having a tough problem

  • reaRYusmyJHaQwMDernell June 15, 2013 at 4:56 PM

    I can't hear anything over the sound of how awesome this artclie is.

  • unable to sign upNirav Kamani June 26, 2013 at 1:03 PM

    sir, help me out i am unable to sign up it sows some error like ajax:500

  • advance javaRahul July 3, 2013 at 8:55 PM

    for more awt n swings program

  • core javasourav sharma July 24, 2013 at 2:08 AM

    package UI; import java.awt.Color; import java.awt.Container; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Paint; import java.awt.PaintContext; import java.awt.Rectangle; import java.awt.RenderingHints; import java.awt.Toolkit; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.geom.AffineTransform; import java.awt.geom.Rectangle2D; import java.awt.image.ColorModel; import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.Scanner; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JInternalFrame; import javax.swing.JLabel; import javax.swing.JRootPane; public class MainUI extends JDialog implements MouseListener { /** * @param args */ static String[][] templocations=new String[5][]; static int check1,check2,check3,check4,check5; ImageIcon imgicon; Image img; static JButton butt; JLabel addlabel,configure,exit; static Container con; EnlargeUI largeUI; static int count=0; static File savelocations = new File("e:\\Dock\\ObjectDock.doc"); static File savealwaysonTop = new File("e:\\Dock\\alwaysonTop.doc"); AddFrame temp=new AddFrame(this); static String checkTop=""; public MainUI(){ con = getContentPane(); try{ CreateButton button=new CreateButton("","",this); setUndecorated(true); setBounds(0, 0, 500, 65); setLayout(null); try { if(!savelocations.exists()){ savelocations.createNewFile(); // TODO Auto-generated catch block } if(!savealwaysonTop.exists()){ savealwaysonTop.createNewFile(); } } catch (IOException e) { e.printStackTrace(); } try { Scanner scanFile=new Scanner(savelocations); while(scanFile.hasNext()){ String[] splitLocations=scanFile.nextLine().split(";"); AddFrame.GetID.setText(splitLocations[0]); templocations[Integer.parseInt(splitLocations[0])-1]=new String[2]; templocations[Integer.parseInt(splitLocations[0])-1][0]=splitLocations[1]; templocations[Integer.parseInt(splitLocations[0])-1][1]=splitLocations[2]; AddFrame.GetPath.setText(splitLocations[1]); AddFrame.GetTarget.setText(splitLocations[2]); System.out.println(splitLocations[0]); AddFrame.addShortCuts(); } scanFile.close(); Scanner scanFile1=new Scanner(savealwaysonTop); while(scanFile1.hasNext()){ checkTop=scanFile1.nextLine(); } if(checkTop.equalsIgnoreCase("True")){ ConfigureUI.alwaysonTop.setSelected(true); }else{ ConfigureUI.alwaysonTop.setSelected(false); } } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } addlabel = new JLabel("ADD"); addlabel.setBounds(400, 5, 50, 25); addlabel.addMouseListener(this); configure = new JLabel("CONFIGURE"); configure.setBounds(400, 20, 70, 25); configure.addMouseListener(this); exit = new JLabel("EXIT"); exit.setBounds(400, 35, 50, 25); exit.addMouseListener(this); con.add(addlabel); con.add(configure); con.add(exit); setVisible(true); }catch(Exception e){ e.printStackTrace(); } } public static void main(String[] args) { // TODO Auto-generated method stub new MainUI(); } public void mouseClicked(MouseEvent arg0) { // TODO Auto-generated method stub if(arg0.getSource()==addlabel){ AddFrame add = new AddFrame(this); add.setVisible(true); }else if(arg0.getSource()==exit){ try { FileWriter writetoFile = new FileWriter(savelocations); for (int i = 0; i < templocations.length; i++) { if(templocations[i]!=null && !templocations[i][0].equals("")){ writetoFile.write((i+1)+";"+templocations[i][0]+";"+templocations[i][1]+"\n"); } } writetoFile.flush(); writetoFile.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.exit(0); }else if(arg0.getSource()==configure){ ConfigureUI confi=new ConfigureUI(this); if(ConfigureUI.Y==1){ confi.setBounds(arg0.getXOnScreen(), arg0.getYOnScreen()-130, 130, 200); }else{ confi.setBounds(arg0.getXOnScreen(), arg0.getYOnScreen(), 130, 200); } confi.setVisible(true); } } public void mouseEntered(MouseEvent arg0) { // TODO Auto-generated method stub } public void mouseExited(MouseEvent arg0) { // TODO Auto-generated method stub } public void mousePressed(MouseEvent arg0) { // TODO Auto-generated method stub } public void mouseReleased(MouseEvent arg0) { // TODO Auto-generated method stub // largeUI.setVisible(false); } } //////////pleas correct this program and mail it to me i need it badly/////////

  • thanksshreeni July 28, 2013 at 7:41 PM

    It is very useful website. but i need more advanced topics in java til now relesed and their details. it should know about to beginers also

  • javasourav kumar das September 24, 2013 at 6:02 PM

    I LIKE IT AND IT IS VERY USEFUL

  • javaHoward berklin.B September 19, 2013 at 9:44 PM

    java is helpful to how to write the basic programs?

  • SSL Session managementBijay September 19, 2013 at 11:12 PM

    Hi, I have been looking for a solution to the problem of SSL Session that is just not going right. I hope you are the right group to reach out, else please help me to reach out to the concerned experts. Scenario: Site is secured (accessed thru https), hence, the connector is defined in server.xml (Tomcat 7.0.32) as: <Connector port="443" SSLEnabled="true" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" disableUploadTimeout="true" acceptCount="100" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="D:\Cert\somefile.keystore" keystorePass="******" ciphers="SSL_RSA_WITH_RC4_128_MD5,SSL_RSA_WITH_RC4_128_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_128_CBC_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,TLS_RSA_WITH_RC4_128_SHA"/> APR Listener is commented out. Index page is a form-based login page, authentication is done by another JSP and certain required user credentials are stored in â??sessionâ?? object as mentioned: session.setAttribute("userid",userid); session.setAttribute("username",username); While logging out, following is the code to invalidate the session: session.removeAttribute("isActive"); session.removeAttribute("userid"); session.removeAttribute("username"); session.invalidate(); response.setHeader( "Pragma", "no-cache" ); response.setHeader( "Cache-Control", "no-cache" ); response.setDateHeader( "Expires", 0 ); response.setHeader("Connection", "close"); response.sendRedirect("index.jsp"); Site works perfectly fine when I access it within the office network (that is, in the same network domain). Problem / issue: When I access the site from outside office (internet), it works fine for the first login, but after logout and when I login as another user, it still shows the previous user credentials. And it becomes even worse when I try login as third user, I get all three users at certain times across pages in my site. As I was reading â??how-toâ?? about SSL in Apache site, I came across that SSL Session need to be handled differently, I tried to invalidate the session as follows, but it throws out error saying â??cannot type cast SSLSupport to SSLSessionManagerâ??: org.apache.tomcat.util.net.SSLSessionManager mgr = (org.apache.tomcat.util.net.SSLSessionManager) request.getAttribute("javax.servlet.request.ssl_session_mgr"); mgr.invalidateSession(); I would be grateful to your help and guidance on resolving this issue. Please do let know if further any information required for clarification. Regards,

  • javasharanabasappa January 26, 2014 at 1:06 AM

    clarification....

  • web mining in javam.pavithra January 28, 2014 at 1:22 PM

    I want coding for search engine in java......plz send that to my mail.......

  • eclips always give some problemsony March 21, 2014 at 12:21 AM

    whenever I am trying to run exciting code, eclipse stuck...for example it will take more than 30 min to build the project. Please suggest me what to do!!!

  • javamukund rodge June 7, 2014 at 2:16 PM

    how to change table heading into marathi language i used marathi font that cant be passible so plzz give me ansert

  • java projectMadhu sudhan April 29, 2014 at 1:32 PM

    i am trying to make java project from core java by using jframe !!! please help me !

  • java,j2eeraj April 18, 2014 at 12:53 AM

    i want to learn java.advanced java

  • java,j2eeraj April 18, 2014 at 12:56 AM

    i want to learn java,advanced java

  • Java program for static methodAbhishek hack April 18, 2011 at 2:09 PM

    public class staticc{ int i; static int j; public static void staticMethod(){ System.out.println("you can access a static method this way"); } public void nonStaticMethod(){ i=100; j=1000; System.out.println("Don't try to access a non static method"); } public static void main(String[] args) { //i=100; j=1000; //nonStaticMethod(); staticMethod(); } }

  • source code for an ieee projectArchana K Prasad June 15, 2011 at 11:48 AM

    i need java source code for the ieee project "an energy efficient medium access control protocol for wireless sensor networks"

  • some help neededTripti Singh December 1, 2011 at 6:21 PM

    i have previously saved riht programs,i have installed the jdk1.5 and set te path again and tried to run those programs by command promt.it was compiled successfully ,but on running it given an exception-exception in thread main-no classDefFounnd! ,plz guide me about it,the attempt of running it on netbeans has also failed.

  • GUI for car rental systemRemz December 5, 2011 at 8:56 AM

    I'm not to sure on how to create a GUI's in java and i'm wondering if you could help also I tried to create two new classes but I can not get them to run properly no matter what i do here is my code: package carrental; import java.util.*; import java.util.Scanner; class Res { private String name; private int num; // private String make; // private String model; // private String regNo; private Car reservecar; private int deposit; private int rate; Res(String name, int num, String model, String regNo, int days, int cost) { } public String getName() { return name; } public int getNum() { return num; } } class Car { private String make; public String model; private String regNo; private int deposit; private int rate; public Car(String newMake, String newModel, String newRegNo, int newDeposit, int newRate) { make = newMake; model = newModel; regNo = newRegNo; deposit = newDeposit; rate = newRate; } public String getMake() { return make; } public String getModel() { return model; } public String getRegNo() { return regNo; } public int getDeposit() { return deposit; } public int getRate() { return rate; } } public class Main { public static void main(String[] args) { ArrayList<Res> reservelist = new ArrayList<Res>(); ArrayList<Car> carlist = new ArrayList<Car>(); Scanner input = new Scanner(System.in); carlist.add(new Car("Toyota", "Altis", "SJC2456X", 100, 60)); carlist.add(new Car("Toyota", "Vios", "SJG9523B", 100, 50)); carlist.add(new Car("Nissan", "Latio", "SJB7412B", 100, 50)); carlist.add(new Car("Murano", "Nissan", "SJC8761M", 300, 150)); carlist.add(new Car("Honda", "Jazz", "SJB4875N", 100, 60)); carlist.add(new Car("Honda", "Civic", "SJD73269C", 120, 70)); carlist.add(new Car("Honda", "Stream", "SJL5169J", 120, 70)); carlist.add(new Car("Honda", "Odyssey", "SJB3468E", 200, 150)); carlist.add(new Car("Subaru", "WRX", "SJB8234L", 300, 200)); carlist.add(new Car("Subaru", "Imprezza", "SJE8234K", 150, 80)); int num; System.out.println(); do { System.out.println("\t1. Make Reservation. "); System.out.println("\t2. Delete Reservation."); System.out.println("\t3. Review Reservations."); System.out.println("\t4. Quit."); System.out.println(); num = input.nextInt(); switch(num) { case 1: Make(carlist, reservelist); break; case 2: Delete(carlist, reservelist); break; case 3: Review(carlist, reservelist); break; case 4:System.out.println("Thank you for using this program."); break; default: System.out.println(" Please follow directions\n" + " 1 Make Reservation. \n" + " 2 Delete Reservation.\n" + " 3 Review Reservations. \n" ); } }while(num != 4); } public static void Make(ArrayList<Car> carlist, ArrayList<Res> reservelist) { String name = null; int num = 0; Scanner input = new Scanner(System.in); System.out.print("Enter model to rent: "); String model = input.nextLine(); for (Car s : carlist) { if (model.equals(s.getModel())) { System.out.println("Model " + model + " is available"); System.out.print("Enter number of days: "); int days = input.nextInt(); System.out.println("****Details****"); int cost = days * s.getRate() + s.getDeposit(); System.out.println("Deposit DailyRate Duration TotalCost"); System.out.println(s.getDeposit() + " " + s.getRate()+ " " + days + " " + cost); System.out.print("Proceed to rent?( y/n ): "); String dec = input.next(); if (dec.equals("y")) { System.out.println("Enter Customer Name: "); name = input.next(); System.out.println("Enter IC Number: "); num = input.nextInt(); System.out.println("***Receipt****"); System.out.println("Name ICNo Car RegNo Duration TCost"); System.out.println(name + " " + num + " " + model + " " + s.getRegNo() + " " + days + " "+cost); reservelist.add(new Res(name, num, model, s.getRegNo(), days, cost)); System.out.println("Serving Next Customer "); } else if (dec.equals("n")) { System.out.println("Serving Next Customer: "); } } /* if ( carlist.remove(s)) { System.out.println(" Car not available");*/ } } //Delete reservation made public static void Delete(ArrayList<Car> carlist, ArrayList<Res> reservelist) { Scanner input = new Scanner(System.in); System.out.print("Enter name on reservation: "); String name = input.nextLine(); for(Res f : reservelist) { if(name.equals(f.getName())) { System.out.println(f); } } } //review list of reservations public static void Review(ArrayList<Car> carlist, ArrayList<Res> reservelist) { System.out.println(reservelist.size()); } }

  • i need help in this exersizeAnisa January 15, 2012 at 2:13 AM

    Write a program that creates a text file that contains a power of two table in HTML format. The file could be called "twoPowerTable.html". When it is viewed with a browser you will see something like: Power of 2 Value 0 1 1 2 2 4 3 8 4 16 5 32 6 64 7 128 8 256 9 512 10 1024 The file should start with something like: <html><head> <title>Powers of Two</title> </head> <body> <table border cellpadding=5> <tr><th>Power of 2</th><th>Value</th></tr> And end with: </table> </body></html> Each line of the table looks like: <tr><td>0</td><td>1</td></tr>

  • Databasekovilmani February 8, 2012 at 9:51 AM

    code

  • ThreadsRicha Seth July 2, 2013 at 10:57 AM

    I want that all threads will notify each other and kill the other threads once the thread search the path. package richa; import java.io.File; class MyThread extends Thread { static int spc_count = -1; public MyThread(String s) { super(s); } public void run() { System.out.println("Run: " + getName()); File file = new File(this.getName()); System.out.println("Directory:" + file); Process(file); } public void Process(File aFile) { spc_count++; String spcs = ""; for (int i = 0; i < spc_count; i++) spcs += " "; if (aFile.isDirectory() && aFile.getName().equals("abcdefgh")) { System.out.println(spcs + "[REQUIRED DIREECTORY] " + aFile.getAbsolutePath()); } else if (aFile.isDirectory()) { // System.out.println(spcs + "[DIR] " + aFile.getName()); File[] listOfFiles = aFile.listFiles(); if (listOfFiles != null) { for (int i = 0; i < listOfFiles.length; i++) { Process(listOfFiles[i]); } } else { // System.out.println(spcs + " [ACCESS DENIED]"); } } spc_count--; } } class TestThread { public static void main(String arg[]) { File[] roots = File.listRoots(); System.out.println("Total Paths:" + roots.length); for (int i = 0; i < roots.length; i++) { MyThread temp = new MyThread("" + roots[i]); System.out.println(roots[i]); System.out.println("Started Thread:" + i); temp.start(); // while(true){ // // if(testFound==true){ // // for(Thread thread : threads) // // { // // thread.interrupt(); // // //thread.stop(); // // } // // break;//breaks from while loop // // } // // else{ // // try { // // t.sleep(1); // // } catch (InterruptedException e) { // // // TODO Auto-generated catch block // // e.printStackTrace(); // // } // // } // // } } } }

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
SQL Tutorial

SQL Example, Codes and Tutorials
 

Java Technology Tutorials

Java Example Codes and Tutorials
Java Tutorials - Java Example Codes and Tutorials Java is great programming... Java conversion tutorials with example.  ... Java String tutorials with example.   

Free SQL books

SQL Example, Codes and Tutorials
SQL Example, Codes and Tutorials       SQL Tutorials: Collection of SQL tutorials for beginners and advance programmers. We have developed many tutorials and examples on SQL 

HTML Questions

HTML codes
HTML codes  Hi, I am trying to find HTML codes to learn HTML. Can any one html me? Thanks   Hi, Please check HTML examples and HTML5 Tutorials page. Thanks 

Spring 3

Spring AOP tutorials and example codes.
in pure java and there is no need of special compilation process. It does... in a Java EE web container or application server. It is another way of thinking about... executed after a jointpoint completed normally, called after advice. For example 

Programming Tutorials

C++Tutorials
benefit to download the source code for the example programs, then compile and execute each program as it is studied. The diligent student will modify the example... other tutorials, such as C++: Annotations by Frank Brokken and Karel Kubat 

General

Java Tutorials - Java Example Codes and Tutorials
 

Spring Framework Questions

No complete codes for Simple Form Controlle Example
No complete codes for Simple Form Controlle Example  No complete codes 

JSP Servlet Questions

Request for codes - JSP-Servlet
Request for codes  Sir , I am an engineering student i am interested in learning JAVA also i need some example code for creating Registration form codes for creating web based application using JSP sir plz send me which 

Java Beginners

java codes - Java Beginners
information. http://www.roseindia.net/java/example/java/swing/ Thanks...java codes  how to use the jpasswordfield? what is the code?  ... get the password by searching this example's\n" + "source code 

Java-Tutorials

Tutorials on Java
examples Java FTP Library Advanced Java Tutorials Java Example Codes... Tutorials on Java Tutorials on Java topics help programmers to learn... on Java like wrapper class, break example, get example, Biginteger 

Servlets-Tutorials

Servlet Tutorials for Beginners
Resources Java : Servlet Tutorials - Index page of Servlet tutorials at Rose...Servlet is a Java based technology used to create dynamic web pages... limitations. Also, Java Servlet enabled you to overcome the limitations of CGI 

JEE Technologies

XML Tutorials
Example codes and Tutorials XML and the Document Object Model... programming. In these tutorials we have developed example programs using... This Example shows how to create an empty DOM Document . JAXP (Java 

Java Beginners

java tutorials
java tutorials  Hi, Much appreciated response. i am looking for the links of java tutorials which describes both core and advanced java concepts... topics in detail..but not systematically.For example ..They are discussing about 

Spring Framework Questions

Problem in Spring 3 MVC and Hibernate 3 Example tutorial source codes
Problem in Spring 3 MVC and Hibernate 3 Example tutorial source codes  I referred your tutorial "Spring 3 MVC and Hibernate 3 Example" and downloaded your source codes. I created a build.xml and built it using ant. And copied 

Java-Tutorials

Chart & Graphs Tutorials in Java
Chart & Graphs Tutorials in Java       Best collection of Graphs and Charts Tutorials in Java. Our Chart and Graphs tutorials will help learn everything you need 

Applet Questions

AWT Tutorials
AWT Tutorials  How can i create multiple labels using AWT????   Java Applet Example multiple labels 1)AppletExample.java: import javax.swing.*; import java.applet.*; import java.awt.*; import 

C++

C Tutorials
C Tutorials       In this section we have given large number of tutorials on C... will be needing a C compiler on your machine. Here are the tutorials of C 

JSP Tutorials

JSF - Java Server Faces Tutorials
JSF - Java Server Faces Tutorials Complete Java Server Faces (JSF) Tutorial - JSF Tutorials. JSF Tutorials at Rose India covers... that makes JSF learning easy and fast. You can download all the codes in easy to use 

Blog

Site map - C Tutorials
; C Tutorials  | Java Tutorials | PHP Tutorials  | Linux... Tutorials | Dojo Tutorials   | Java Script Tutorial | CVS Tutorial... default values | C Array Declaration | C Array copy example Java Tutorial 

Spring 4 Tutorial

Spring Framework 4: Spring Framework 4 Tutorials and Example
Spring Framework 4: Latest Tutorials, examples and same code of Spring 4 frame work. Here in this section you will find tutorials, examples and many sample codes of Spring 4. You will learn how Spring Framework can be used for the web 

Java Testing

DBUnit Tutorials
with proper example. The DbUnit is an extension of JUnit which is used data-driven Java applications. With the help of DbUnit you can repopulate your database with sample data and perform unit testing of the Java application. This helps 

Submit-Tutorials

Submit Tutorials - Submitting Tutorials at RoseIndia.net
Submit Tutorials       Submitting Tutorials at RoseIndia.net is very easy. We welcome all members to submit their tutorials at RoseIndia.net. We are big tutorial web site 

Spring Framework

Spring 3.0 Tutorials with example code
Spring 3.0 - Tutorials and example code of Spring 3.0 framework... of example code. The Spring 3.0 tutorial explains you different modules... download the example code in the zip format. Then run the code in  Eclipse 

General

Java - JDK Tutorials
Java - JDK Tutorials   This is the list of JDK tutorials which... should learn the Java beginners tutorial before learning these tutorials. View the Java video tutorials, which will help you in learning Java quickly. We 

Programming Tutorials

Tutorial, Java Tutorials
Tutorials Here we are providing many tutorials on Java related technologies. All the tutorials are very useful for programmers. You can learn... NIO Java NIO Tutorials 

J2ME

J2ME Key Codes Example
J2ME Key Codes Example       This application illustrates how to print the key value with the current key pressed on the canvas. In this application we are using the keyPressed 

Development process Questions

show codes of this
show codes of this  search for the number of occurrence of "and" and "the" in the following sentence by writing a codes. the student like the best teacher at the end of the lessons and others 

JSP Tutorials

JSP Tutorials - Page2
JSP Tutorials page 2 JSP Examples Hello World JSP Page By this example we are going to teach you that how can you write a "hello... This section shows you how to import a java package or the class in your jsp 

XML Tutorials

XML, XML Tutorial, XML Tutorial Online, XML Examples, XML Tutorial Example
tutorials mentioned below. We are giving XML tutorials and example codes for free...XML XML Tutorials and examples In this section we will learn XML with the help of tutorials and example code. If you are a beginner in XML then learn 

DMCA.com