32,199 Topics
| |
Hey everyone, I am having a small problem with sorting objects. I have a method called organizeTank. It should sort the fish in the tank such that: (1) all dead fish come first sorted according to size in descending order, (2) all live fish come next such that herbivores come … | |
Hi everyone, I am new to java enterprise edition and used Eclipse previously. I need to integrate apache maven with my eclipse. I saw a few tutorials like the one [url]http://www.eclipse.org/m2e/[/url] , and i tried to follow it but i could find the other option in the import dialogue. I … | |
hey there, I have this java 3D home assignment I need help with. I would greatly appreciate it if someone could direct me to a solution. I need to build create a 3 D digital clock and add some key navigation to it. I managed to add the key navigation … | |
Hello, i tried to hack my USB MODEM so that i have unlimited INTERNET connection but i failed, any one having an idea on how to do it? | |
Hello can you help me please... can you help me how can i retrieve the data from my database ms access i want to display this in the table...is it possible to use the JTable or not?...please help me thank you in avdvance and i am hoping for your positive … | |
i am a new programmer trying to make a program, which askes the user for a string input and searchs for the string in an array, and prints "Found: ("string") and the position of the string in the array. this is what i have done soo far: [code]import java.util.Scanner; public … | |
hi,i am using haxws to build webservice in java that returns an object not a primitive type.when return primitive type every thing is going well, the error that i am receiving is: [ERROR] javax.xml.bind.JAXBException: class endpoint.data nor any of its super class is known to this context. org.apache.axis2.AxisFault: javax.xml.bind.JAXBException: class … | |
when i run my project in java. i keep getting this stuff. No Console ..... I dont know how to get console in eclipse. here is my code. [code] import java.io.*; public class WordGame { public WordGame() { } public static void main (String args[]) { String WordGuess; WordJudge gm … | |
first of all, thanks for the suggestions lately where im asking to avoid flicking of the ball.. now its working smoothly :)) but i want now to add some more balls.. like 2 - 3 balls.. how can i do that ? i dont have an idea.. thanks guys.. | |
I have counter increase by one every once (round in loop) when the counter equal 100 am need it to go back and count down from 100 to 0, how i can make counter count down again ? [CODE]int i = 0; if(i<=100) {i-- ;) // that false else {i++ … | |
Hey, Is there any code that will hide the icons on my desktop? Thanks in advance | |
whats the advantage of implementing runnable over extending thread | |
Hi.. I have a query regarding accessibility of top level class from member inner class. I have just read the reason why local or anonymous inner classes can access only final variables.The reason being JVM handles these two classes as entirely different classes and so, if value of variable in … | |
[CODE]class A{ void method(){ System.out.println("Hello world"); } } class B{ void myMethod(){ A.method(); } }[/CODE] Can anyone tell me why I am getting this error.( non-static method method() cannot be referenced from a static context).Reffering context is not static.:?: | |
I read some of the threads on calculators, but couldn't find anything related with what I need. We have this swing calculator project, that uses buttons and/or a textbox for input, and a different textbox for output. I have done most of it, and is working ok. The problem I … | |
I have just started out with Java. I have been programing with C and C++ for some years now. I have this problem. Im not able to call a non static method belonging to the main class from the static main method. This is the code: [CODE]public class Helloworld { … | |
| Hey guys, Here's the problem I have: I am writing a server application in Java using the ServerSocket and Socket classes. I have an instance of ServerSocket which listens for connection and accepts them. The server runs a website that requires users to log in using an e-mail and a … |
OK I have a project due tonight at midnight and I know I should have posted sooner but it seemed like such simple things that I just knew I could do it on my own. I was wrong. I need your help. I have a program that essentially makes a … | |
I'm receiving the following errors when trying to read from a file: java.io.FileNotFoundException: rates.txt (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(FileInputStream.java:120) at java.util.Scanner.<init>(Scanner.java:636) at MortgageCalculator4.submitButtonActionPerformed(MortgageCalculator4.java:187) at MortgageCalculator4.access$000(MortgageCalculator4.java:20) at MortgageCalculator4$1.actionPerformed(MortgageCalculator4.java:70) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.processMouseEvent(Component.java:6288) at javax.swing.JComponent.processMouseEvent(JComponent.java:3267) at java.awt.Component.processEvent(Component.java:6053) … | |
hey there again, I am trying to build a small mechanism that lets me store product names and prices on a produktet.txt file. the file should hold lines as follows: product1 price1 product2 price2 . . productN priceN So, I built a small panel with three rows and one column. … | |
Hi Everyone, So I just finished writing a program from my Java class,except I can't figure out how to validate the bookID. "In the Book class, you need to provide a validate method that validate weather the book id is correct. The book id should be a [B]string[/B], which contains … | |
I have been recently working on a java project to just practice java and work on making programs for fun, but i came up upon this bug: When i use Thread.sleep on my java program, it doesent execute the line above the try-catch block where i have my Thread.sleep. heres … | |
How would I get a box to appear when I hover over a JLabel? The box is to explain what the label is. This is just a minor detail for the user-interface functionality of a game. So when a user hovers over a label, a box appears explaining it. | |
Hi Can someone please let me know which classes, objects, etc I should use into to convert an image file (.png, probably) to a printable string in Java? The image will be around 100px square and I presume I could scan 1px lines into arrays, etc? I'm hoping Java has … | |
I was planning to start with a java speech program and went on with some research across the internet. I found that for any such program I need an API called the java Speech API. However when I wrote down import java.speech it showed no existence of any such API. … | |
i have created a war file and save it in tomcat/webapps folder.this war file contains the code of the server that will read xml file and return it as table in a Jframe.i coded it in java and it is a web service where i create a war file after … | |
[CODE] String ip = "www.google.ro"; String pingResult = ""; String pingCmd = "ping " + ip + " -c 4"; String s; try { Process p = Runtime.getRuntime().exec(pingCmd); BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream())); BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream())); // read the output from the command System.out.println("Rezultat ping:\n"); for … | |
I am using the Comm API, i have made a small desktop app for sending sms. I cannot send sms one after the other since it gives "Port In Use Exception". I have closed the Input and output streams as well as the serial port but still it gives "Port … | |
hi please help me to develop code for JTextField exception handling. i have 10 JTextFields out of which 2 are necessary to fill. if the user left them blank then error message will appear. [CODE]try{ text1=a.getText(); text2=b.getText(); while(a!= null && b!=null);} catch(Exception e){ System.out.println("Please write some text" +e.getMessage());} [/CODE] this … | |
im a newbie and im learning java just week ago. I wonder how i cant make the ball bounce in one axis only (the X axis) im not good in logic:( and i want that logic to be in one event. [code]if(x<0){ ++x;//go right }else if(x>500) {--x;//go left } [/code] … |
The End.