32,204 Topics

Member Avatar for
Member Avatar for warlord902

Suppose I have four classes in a package named T namely Main, A, B and C The class Main contains public methods which the classes outside package T access and Main class in turn communicate with other three classes and let some function to happen. Now I want only a …

Member Avatar for warlord902
0
169
Member Avatar for netci

hi, my arraylistS in a covering arraylist behave like the same instance. i manupulate one of them with [CODE]i=0; manupulate(myarrofarrs.get(i));[/CODE], and all the sub arraylists have become effected of the manupulation. i googled a little but in google it was said: "create new instance with myvar=new myobject()" i have already …

Member Avatar for JamesCherrill
0
202
Member Avatar for webmasts

HI, I need some help on using the math.pow() function to solve the following problem: a^n = p(1+ r)^n how would I translate it using math.pow() Thanks for your suggestions and any help!

Member Avatar for Donkerster
-1
1K
Member Avatar for stevanity

I created the following package AccBal. [CODE]package AccBal; public class AccountBalance { private String Name; private double Balance; public void setData(String name, double balance) { Name=name; Balance=balance; } public void displayBalance() { System.out.println("The Account Balance of " + Name + " is $"+Balance); } } [/CODE] Then I created a …

Member Avatar for stevanity
0
241
Member Avatar for neutralfox

Hello friends, I am having a small problem, i have already designed a chat application, the chat works fine over a local network but now I want to use it over the internet. Logically the program should but what happened is that to get the IP I have used [code] …

Member Avatar for kumarprabhug
0
6K
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
90
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
437
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
302
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
225
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
203
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
383
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
134
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
533
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
184

The End.