32,199 Topics

Member Avatar for
Member Avatar for htmler

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 …

Member Avatar for stultuske
-1
90
Member Avatar for shamusk

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 …

Member Avatar for peter_budo
0
274
Member Avatar for bibiki

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 …

1
89
Member Avatar for PHIPH

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?

Member Avatar for stultuske
-5
91
Member Avatar for jemz

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 …

Member Avatar for NormR1
0
78
Member Avatar for Knoxx

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 …

Member Avatar for JamesCherrill
0
3K
Member Avatar for khaled_jawaher

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 …

0
77
Member Avatar for vanzhyme

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 …

Member Avatar for JamesCherrill
0
436
Member Avatar for autorunman22

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..

Member Avatar for JamesCherrill
0
300
Member Avatar for mohamedmo'men

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++ …

Member Avatar for hfx642
0
86
Member Avatar for caswimmer2011
Member Avatar for hfx642
0
172
Member Avatar for thato21math
Member Avatar for stultuske
0
114
Member Avatar for sumeetdesaeee

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 …

Member Avatar for sumeetdesaeee
0
137
Member Avatar for amalwit

[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.:?:

Member Avatar for amalwit
0
224
Member Avatar for ErickN

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 …

Member Avatar for NormR1
0
199
Member Avatar for stevanity

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 { …

Member Avatar for masijade
0
28K
Member Avatar for masterofpuppets

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 …

Member Avatar for masterofpuppets
0
1K
Member Avatar for 24x24

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 …

Member Avatar for NormR1
0
381
Member Avatar for annetria

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) …

Member Avatar for annetria
0
132
Member Avatar for bibiki

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. …

Member Avatar for bibiki
0
144
Member Avatar for student.09

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 …

Member Avatar for benqus
0
4K
Member Avatar for quinnifir

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 …

Member Avatar for JamesCherrill
0
133
Member Avatar for 9Nimo4

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.

Member Avatar for JamesCherrill
0
525
Member Avatar for collizz

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 …

Member Avatar for NormR1
0
237
Member Avatar for chetanbasuray

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. …

Member Avatar for techstu123
0
183
Member Avatar for khaled_jawaher

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 …

Member Avatar for khaled_jawaher
0
268
Member Avatar for b0tz

[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 …

Member Avatar for b0tz
0
223
Member Avatar for ARaza110

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 …

Member Avatar for ARaza110
0
164
Member Avatar for syeda amna

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 …

Member Avatar for Buffalo101
0
2K
Member Avatar for autorunman22

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] …

Member Avatar for autorunman22
0
160

The End.