32,199 Topics
| |
[CODE] FileReader readKGN = new FileReader("KGNLibrary.txt"); int KGNLib = readKGN.read(); readKGN.close();[/CODE] i dunwan read it as int.. because i wan use it on IF, so i need it to compare wat i input string item into text area with text file inside string item. [CODE] if (POS[i].equals(KGNLib)) { jTextArea2.append((POS[i] + … | |
hi.. so basically my program works like this.....first frame > buttons > another frame > more buttons > lead to another frame ... but a few problems are preventing me from doing this. p.s. I don't want to use the cardlayout because I want my buttons like a column, and … | |
Hello, I get a out of memory error on line 4: [CODE]int isDeleted = 0; PreparedStatement psDeleteRecord=null; try { psDeleteRecord=con.prepareStatement(delQuery); isDeleted = psDeleteRecord.executeUpdate(); if(isDeleted !=1){ echoLog("Could not Delete: " + delQuery); } else { numDel++; } } catch (SQLException s) { echoLog("Failed: " + delQuery); s.printStackTrace(); }[/CODE] This block of … | |
hello everyone, Output is coming not equal for same input.what is the error in this program? import java.util.*; class newobj_equal { public static void main(String[] args) { int eid; String ename; double salary; Scanner sin=new Scanner(System.in); System.out.println("Enter eid");z eid=sin.nextInt(); System.out.println("Enter ename"); ename=sin.next(); System.out.println("Enter salary"); salary=sin.nextDouble(); emp e1=new emp(); e1.accept(eid,ename,salary); e1.display(); … | |
hello can you please help me on how to make the loading bar in java can you make this code..i have a program and i want to put a loading bar ..thanks in advance hoping for your positive responds. | |
i've written a game board currently but its minimal. i draw the board and then i've added two labels that i've postiioned off to the right side with setlocation. I dont know that set location will work as i add more controls so i'm looking for a better way. currently … | |
i have created executable jar file for my program pedit.java as follows jar cvfm pedit.jar manifest.txt images *.class splash.gif where images is a directory where the icons for toolbar are there,as my program is a editor... my problem is that when i run the jar file the application is loaded … | |
Hi to everyone, i am wondering which language (java or c#) can create more robust and scalable application including stuffs such as multiprocessing, multithreading, and of course speed???? Thanks, in advance!!! | |
[code] String filename = jfr.getTitle(); File fname = new File(filename); System.out.println(filename); if(filename.equals("untitled")) { System.out.println(filename); return; } else { System.out.println(filename+"+"); } [/code] when i run the above code though the filename is "untitled",the statements under both if and else are been executed... is there any wrong in it?? | |
i am creating a text editor,i am using textpane in that,how to enable discontinous text selection in the textpane?? | |
sooo i finally got the new "pop up" frame after a button is clicked. so than after the user clicks the button and new frame pops up i try to add some stuff and buttons to that new frame.. but it doesn't show. it's just a black frame. I don't … | |
Hello everybody, I'm looking for a ready code in Java for JADE implementation of Bellman-Ford algorithm. I really need in developing Agent for the research. I am not an expert in programming. For anyone who has been developed or seen the Bellman-Ford algorithm source code in Java, I would be … | |
I'm reading a whole xml file in as a string. Some of the Node values are directories, e.g. "C:\" When I print out the string, to make sure that the file has been read in correctly, I see that it has completely ignored the Nodes that have directories in them. … | |
this is my code. I have no clue what could be wrong with it. The error that keeps coming up is: class, interface, or enum expected. The five errors it pointed out are the 'v' in public void actionPerformed at the bottom of the code, the 'g' in the green … | |
Hi, I'm in my second year of computer science and we're currently learning about design patterns. As part of this we have been given an assignment to include the Abstract Factory design. I'm having trouble understanding exactly how it fits together so I was wondering if someone could explain, in … | |
Is there a function with the scanner class to allow for the user's input to just go on one line instead of two. I am using Scanner scan = new Scanner (System.in) with scan.nextInt and it is coming up with 10 4 and I want it to appear on one … | |
Hi..I am trying to connect oracle which is on my pc.i am using oracle 9i. i am creating 1 customer table & trying to display it. [code] import java.sql.*; import java.net.*; public class JdbcDemo{ public static void main(String args[]){ Driver d; Connection con; Statement stmt ; ResultSet rs; try{ d=(Driver)Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); … | |
Hi, i am a php programmer who has no previous programming experience neither in java nor in c#(sharp). My goal is to learn both languages java and c#, so i am looking for an experienced programmer who has in depth knowledge of both languages to suggest me which one to … | |
Hi, I am looking for best approach to query db table and get corresponding values on the basis of Ids passed. I have ids in String array, please provide best approach for point (a) and (b), what to use ArrayList, HashMap, etc... so that there are minimum loops... Sample code: … | |
I need to make a password in php and javascript (with html) so that if the user wants the password to be 6 digits long, then the password is y0z0z2z4z6y2z0z2z4z6y4z0z2z4z6y6z0z2z4z6… If the password is 4 digits long, then the password is y0z0z2z4y2z0z2z4y4z0z2z4. THESE ARE NOT RANDOM NUMBERS. There is a … | |
Ok here is the new thread now could you help me JavaAddict? Please:icon_sad: | |
i have been searching about how to create an executable jar file, [url]http://csdl.ics.hawaii.edu/~johnson/613f99/modules/04/jar-files.html[/url] by seing the above site i have created a jar file,while double clicking the jar file an error saying that "jar file couldnt be loaded check for possible console errors" is being displayed,i had tried by downloading … | |
i have written program for a text editor,how can i turn it into an application??? | |
Hi everyone, I hope im posting in the right section. I'm desperate searching for an algorithm which tells me the similarity between two java codes. Some kind of anti-plagiarizer. The algorithm I found were mostly written in languages like C# .. I'm trying to write it in PHP, even though … | |
i am creating a text editor using java swings concept this is the code i am using to save a file jfr.setTitle(fname.getName()); FileOutputStream fop=new FileOutputStream(fname); fop.write(jta.getText().getBytes()); fop.flush(); fop.close(); where fname is the name given in save file chooser bye the user jta is the text pane in which the text … | |
Hi, This will show you how to create a login form using swing. Please be aware that this form does not connect to anything. ( eg. A URL or a database) This is just a little advanced example of one of the many things you can do in swing. A … | |
The form consist of three textfields and two buttons(add and show buttons). User enters the candidate first name and last name and the respective number of votes received in textfields.On clicking the add button the candidate object is created and the candidate object is added to the arraylist object. On … | |
Hiz every1. i m beginer, i have to make a program of PERFORMANCE APPRAISAL. Please any1 can help from where should i take start .. Waiting for your replies | |
how can i create a magic square using jcreator.. help me please.. | |
Please explain about the Right and Left shift operators in java.. I am new to programming concepts.. So please explain me with examples.. Thank you |
The End.