32,204 Topics
| |
I would like to know what "Invalid Stream Header : 61646F62" means? It happens when I run my program. Thanks. :) | |
i want to make an application with JAVA in which there are registered users. so users can put data in database, can see data from database. my application is there are different doctors from different places and they have common patients( clients) that they care about patients. so they want … | |
I am trying to make a snake game and I am wondering how I could get an element of an vector and then use the number for the y coordinate like when using ararys lets say the x element I am using is 3 then I could type in arrayY[3] … | |
I am making a simple game and I cant seem to get the line to center. I would like it all to be in a column and centered. I have this line of code that is not centering [CODE] JLabel numberOfChangesLabel = new JLabel("" + totalChanges); pane.add (new JPanel ().add(numberOfChangesLabel)); … | |
| I have a few JSpinner(s) and I'm trying to change the button sizes. I know how to change the font of the SpinnerModel(s), but not the button sizes. Can someone please point me in the right direction? TIA! |
Hello. I am trying to input the name of a class that I have imported already, and can instantiate regularly, such as 'myClass inst = new myClass('foo');' and create a new instance-object of that class. The code below illustrates my question more specifically: [CODE] import java.lang.reflect.*; import java.io.*; public class … | |
I posted this out here yesterday and received several great responses using an ArrayList. During a code review it was suggested that a use a List<Sting> for the reusultset. Any Ideas would be welcomed. Thank you for all of your responses yesterday... [code] public List<String> getAnswers() throws DAOException, SQLException{ //This … | |
I want to make a program that find the alphabets present in the string using java language. e-g i hava a string " Hello World " It display me that charactes present in it are H e l 0 w r d It count a character only once. | |
i've created a database project in java in which a jtable is used to display the contents of the database.......i've also created an option for insertion of values through a textfield by button actionperformed into the database ......and now when i inserts a particular values through the textfield and when … | |
Hi, I am stuck with few problems related to JSP - Java applet file write and database connectivity issues. 1) Calling the applet class from JSP works in the web browser. But the file write code written in applet does not work when called from JSP ( It works if … | |
I want to update 0X0 when I press of the "AC Milan" to be "1X0" and the last scorer also to be updated with the winner; Also, how to fix the alligenment to the center >>! [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class TestSwingListeners1 { public static void main(String[] … | |
I have connected java with oracle and providing the facility of accessing data on the lan... I have also open a port, but still my java app over lan start very slowly after that it speed up, but at startup its very slow Y? Thank you for any suggestion | |
Hello there, I'm busy working on a project using GWT and Sencha GXT libraries. I have come to this stage that I now have to populate a tree with data received from an XML file... I have no idea how to do this, I've gone through the javaDocs but it … | |
Hy again , I have another problem now , I have an application with a jTabel , you can double click a cell and you can change the value that is inside it , after you changed the value inside the cell and hit enter the value i enterd remains … | |
Hi everyone. I am trying to make a batting average calculator, but i am pretty new to java. I want to make it look like this: [url]http://www.kll.org/batting-average.htm[/url] All i have right now is JOptionPanes, and it works, but it doesnt look very nice. So i know i need to put … | |
I am new to Java and could use some help. Trying to write something using scanner or a JoptionPane to convert inputs from Gregorian to Julian. Then use interface to convert it the other way. How do I start and what do I do? | |
I believe this is similar to the dining philosophers problem but a little different and somewhat easier. [url]http://en.wikipedia.org/wiki/Dining_philosophers_problem[/url] Basically I have a barrier class and a waitingThread class. I need to create 4 threads. Each thread is meeting at a place to "eat". But none can begin "eating" until the … | |
I developed a method to query a database and return the specific values that I'm looking for except that the value being returned is the last value. In my while loop I can do a system.out.println(answers)and I can see all of the values, my return answers only returns the last … | |
i am new to java i hava saw error that illegal start of error in this program [CODE]public class double { public static void main(String[] args ) { double d=1232.44; System.out.println("the double value is :"+d); }}[/CODE] please help me | |
how to set the selected item in combo box as displayed in java. please help me | |
Java - How to use system clipboard to copy and paste objects(JLabel or JButton) in a JFrame | |
Hello everyone, I have a question regarding a Japplet that I am creating for a theatre. The program is supposed to take a yes or no response from the user, take which section the user will be sitting in, ask how many tickets they would like to purchase, and then … | |
I have a loop which shows an input dialog, process it and shows the name and picture of the student using setText and setIcon. After, I want to have at least 1-2secs of delay/pause so the user can have a look on it [B]before it loops back[/B] to show the … | |
Write a java program to read a number up to 15 digits long or a date (dd/mm/yyyy). The program should distinguish numbers from input date, and prints them in alphabetic spelling form. Example: for input 234334564456455 the output should be : 234,334,564,456,455 is two hundred thirty four trillions and three … | |
Hi..I am a newbie in JavaScript.I have two forms (in two different webpages) all with radio buttons. A user cannot select more than one option from each form. My plan is to pass the user input from both the forms to a perl script which would then query a MySQL … | |
i am new to javascript and jquery. i want a code that can load images from file, then display them one by one repetitively and randomly and possibly a text alongside each signifying something-what you call flash animation | |
I'm having problems with my code regarding the value of the string I get with the JTextfield.getText() method my code goes this way: [CODE](keypressedevent evt){ int id=evt.getId(); char c = evt.getKeyChar; String s = JTextField.getText()+c; System.out.print(s); } [/CODE] if the textfield contains for example: apple and you type s, it … | |
Hy , i read all the other posts about this error but didn`t helped me , tried google but notheing. I have the following method : [CODE] private void jButton1MouseClicked(java.awt.event.MouseEvent evt) { // TODO add your handling code here: DefaultTableModel model = (DefaultTableModel)jTable2.getModel(); int nrrows = jTable2.getSelectedRowCount(); int[] rows = … | |
WHY WHEN I EXECUTE THE BELOW CODE I GETS AN EXCEPTION [B]java.sql.SQLException: No ResultSet was produced[/B].........BUT EVEN THOUGH INSERTION OPERATION WORKS FINE........CAN ANYONE TELL ME WHY THIS EXCEPTION COMES [CODE=java] Connection co; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); co = DriverManager.getConnection("jdbc:odbc:hh"); Statement st1; ResultSet result; st1 = co.createStatement(); result=st1.executeQuery("select count(*) from rooms"); result.next(); … | |
Hello, I'm trying to write a simple program to finde words betwen statments like <int></int>. I converted String stream to a charArray, to get indexes of chars in the string. [CODE] public void foo(){ bucket=str.toCharArray(); System.out.println(str.substring(548,563)); System.out.println(str.substring(644,656)); System.out.println(str.substring(844,857)); System.out.println(str.substring(942,954)); System.out.println(str.length()); for(int i=0;i<str.length();i++){ if(bucket[i+0]==':' && bucket[i+1]=='i' && bucket[i+2]=='n' && bucket[i+3]=='t' && … |
The End.