32,204 Topics

Member Avatar for
Member Avatar for xxunknown321

i'm trying to come up with an add method for a generic class i created. generally the object i create will be arrays, of type integer double or string. i dont know how to go about making the add method to have stuff added to the array... heres my code …

Member Avatar for ProgrammerAl
0
366
Member Avatar for Random_Integer

I know you can, [CODE]frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);[/CODE] but is there a way to get it to execute a method and then exit? example.. [CODE]frame.setDefaultCloseOperation(saveData, JFrame.EXIT_ON_CLOSE);[/CODE] just a guess? thanks all

Member Avatar for Random_Integer
0
118
Member Avatar for ge0rge007

Hello all! I am trying to create a server - client bundle that will let me send simple messages with ssl support. I am quite new at java and i can't figure out what my problem is. I am running the server and client programs at 2 computers at the …

Member Avatar for ge0rge007
1
165
Member Avatar for Akill10

Hi, I am pretty sure there is a more effective way of achieving this. Would love for some input from you guys. Basically, I have a class called GamePanel and it contains this: [CODE] SpaceShip spaceship = new SpaceShip("Galatar"); public void paintComponent(Graphics g) { Graphics2D g2d = (Graphics2D) g; g2d.drawImage(bgI,0,0,null); …

Member Avatar for Akill10
0
173
Member Avatar for endro

Hey all, I need some help on this program cause I'm stumped. Everytime I compile this program is gives me an error of either "cannot find symbol" or "int cannot be dereferenced". I'm still playing around with the code but I might have to put the other class in a …

Member Avatar for endro
0
135
Member Avatar for muraj

/*1st - What I want to do is have the user input 2 numbers. Program should determine which is lowest and highest, then spit it out. Then I’m trying to have the user input a 3rd number that is equal to or in between the lowest number and highest number. …

Member Avatar for Akill10
0
137
Member Avatar for khaled_jawaher

i am using jdom to read contents from xml file.i am trying to put the field read in a table created in java.the problem is that when i am getting the contents and printing it in the console every thing is going well.but when i add the contents to a …

0
81
Member Avatar for anilopo

A - an interface. B,C,D - implement A. in an other class, say X, i have an array of A, that will hold some B, C, D. i have a method that get (int i, A a) and put the a in the i place of the array. ->>>> how …

Member Avatar for anilopo
0
79
Member Avatar for Random_Integer

I'm doing a practice project to save golf statistics. It will display different data using tables. I wanted to run it through a jar file. But when I exit, obviously all of the data in my arrayList is gone. Any ways to save the arraylist? thanks a lot, -10100

Member Avatar for ajst
0
118
Member Avatar for sneha Butala

I want to create a project on Genetic Algorithm using java for the msc final year..so how i can start to create a project..

Member Avatar for masijade
0
253
Member Avatar for SailBlue5

I am working on a program that asks a user for a date and they can enter any string and I want to convert it to a date. For example I might have a user that enters Aug 24th 1998, or one that enters August 24 1998, or 8-24-98. I …

Member Avatar for masijade
0
82
Member Avatar for Phil++

Hello there, I'm working on a project and for this I'm using classes, in my main I'm using an array of objects. When I compile it, it works fine, but when I try to enter values, it displays this message: "Exception in thread "main" java.lang.NullPointerException at main.main(main.java:25)" Here is my …

Member Avatar for masijade
0
88
Member Avatar for num90

Hi guys this time i enjoy my mini vacation but in this time i want to make a little software using "c" or "c++" for my project. so pls help me and any software u know so pls give me the whole code?

Member Avatar for ajst
-1
73
Member Avatar for queen11

can someone help me or give me codes on how to save images into database i'm a new user of java.

0
68
Member Avatar for jlovesfishiee

Hi, I am a beginner learning about java language and netbeans, and have a few questions I would like to ask. I want to create a new JSP page to allow a user to add new attributes/items, or to update the attributes in a database/table that I already have. How …

Member Avatar for jlovesfishiee
0
236
Member Avatar for bholas

i am stucked in my program that i need to get that that involves designing a database with a simple gui to add and remove items i also need it to connect to amazon please guys help me out for that at the earliest......

Member Avatar for ProgrammerAl
-2
67
Member Avatar for cempaka123

h[B]ow to create a java program using applets by calculate the groccary items please help me[/B]

Member Avatar for ProgrammerAl
0
87
Member Avatar for seanbp
Member Avatar for Hellomy

So I am using a Clip to play a wav file that is in the resource, it works perfectly when I am running the application through eclipse, but when I export it as a Jar/Runnable Jar, the sounds will not play. I know it is not a resource problem because …

0
43
Member Avatar for PennyBoki

the errors are commented in the code: help??? [code]import java.awt.*; import java.awt.event.*; import java.applet.*; import javax.swing.*; import java.lang.*; public class Kol2_1 extends Applet implements ActionListener { Button plus = new Button("+"); Button minus = new Button("-"); Button times = new Button("*"); Button div = new Button("/"); Button eq = new …

Member Avatar for cempaka123
-1
206
Member Avatar for smoke1914

I need help to write a program which calculates your grade for this class. All grades input should be taken from keyboard. the grade is calculated as follows: Grades = (homework-1 + homework-2 + homework-3 + homework-4 + homework-5)* .10 + midterm * .20 + final * .30

Member Avatar for ProgrammerAl
0
84
Member Avatar for JellyTurf

The first block is all of my methods and stuff and the second block is just the driver. i'm trying to get it to ask the user if it wants to repeat the whole thing again, but it only works with the last 2 choices [CODE]import java.util.*; public class methodsForTest …

Member Avatar for ProgrammerAl
0
133
Member Avatar for ethio

Hello all, I'm creating a login application using swing but ive run into problems already, I need help on making the if else statement work so the background is red. Your help is very much appreciated, [CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; class MyWindowListener extends WindowAdapter { public void windowClosing(WindowEvent …

Member Avatar for quuba
0
118
Member Avatar for oggiemc

Hi all, Im getting the folllowing error for the attached applet code when i try to view it through windows explorer: java.security.AccessControlException: access denied (java.util.PropertyPermission java.class.path read) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPropertyAccess(Unknown Source) at java.lang.System.getProperty(Unknown Source) at AppletTest.init(AppletTest.java:26) at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source) at java.lang.Thread.run(Unknown Source) …

0
52
Member Avatar for Liviu0CODER

My problem is that when i play a game on messenger(eg. chess), my cpu is 100% and my computer is responding hard. What can i do to lower my cpu usage ? I have windows Xp service pack 2, and using java 6 , update 22. My Pc has 1 …

0
59
Member Avatar for ajst

Hi Guys, I'm basicly reading from a CSV File that im using to store data. Now when I read from the CSV file i want to load the data to fill in the parameters eg. the csv file contains name,address,age,favColor. so when i load the file i want it to …

Member Avatar for jon.kiparsky
0
137
Member Avatar for PadmeTraner

It just won't. No matter what I try, it won't even output what I tell it to, muchless as me for input. Here's the code: [CODE]package javatask1; import static java.lang.System.out; import java.util.Scanner; public class Main { public static void main(String[] args) { public static int moneyEarned = 0; Scanner myScanner …

Member Avatar for sincerelibran
0
150
Member Avatar for erogol

I divided 13/24 in java but the result value is printed as 0.0; the variables like; int asd = 13; int dfg = 24; double result = (double)(asd / dfg); print(result); // 0.00 How can I get the exact value?

Member Avatar for sincerelibran
0
102
Member Avatar for thalz

I am new to java and i want to use this programming language for our final project. Pls help me configure lynksys wrt54g using java app. Its unique feature is to limit the time of the registered user to use the internet and it will automatically cut off if the …

Member Avatar for Slimmy
0
334
Member Avatar for hauda67

I was wandering if I could get some help in refining my code for the following problem: "Write a java program that declares an array alpha of 50 elements of type double. Initialise the array so that the first 25 elements are equal to the square of the index variable …

Member Avatar for hauda67
0
162

The End.