32,204 Topics

Member Avatar for
Member Avatar for ceyesuma

Why does this give the error "cannot reference this before supertype constructor has been called" I thought that is the first thing I did in the constructor. [code] /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package application1; import …

Member Avatar for ceyesuma
0
189
Member Avatar for mahdi68

Hi How can i know in java , pc is connected to internet or no (is online or offline) ??? thanks

Member Avatar for mahdi68
0
96
Member Avatar for Clawsy

Hi, I have little experience with writing to Http socket. I am trying to send data to another computer through Http protocol, just like having a chat between two application but instead of using Socket connection I want to use Http connection. The server writes to [I]http[/I] connection data and …

Member Avatar for Clawsy
0
226
Member Avatar for aaanchal

i m working with this program but dont know how to add counter in it in order to check running / execution time of program.please help me. and telll how and where to add code for this task?plz reply soon. public class InsertionSort{ public static void main(String a[]){ int i; …

Member Avatar for darkagn
0
180
Member Avatar for chixm8_49

Hello. I am constructing a database using GUI. I wanted to have all my containers to be on one window. I am having a problem on how to have these containers on one window. Any suggestions? I am very sorry if the code was seem weird. Here's the code: [CODE]public …

Member Avatar for darkagn
0
96
Member Avatar for huvz

Split from - http://www.daniweb.com/forums/thread30207.html > Here's the program that I wrote, but I'm having problems with my ending balance and overdraft fee. The overdraft fee is multiplied by whatever amount I enter: can some help; here's the program: import java.io.*; import java.lang.*; public class BankAccount5 { public static void main(String[]args)throws …

Member Avatar for jwenting
-2
79
Member Avatar for jmguerriero

This is my first post in the Dani community. I am brand new to java, 5 weeks into an intro to computer programming course. My assignment is to create 10 random numbers between 50 and 100. Then I am supposed to sort them from lowest to highest, find the average …

Member Avatar for jmguerriero
0
551
Member Avatar for aaanchal

im working with this program for merge sort. i want to add a counter in it in order to check running / execution time ofd program. please help me. please reply soon. public class mergeSort{ public static void main(String a[]){ int i; int array[] = {12,9,4,99,120,1,3,10}; System.out.println(" Selection Sort\n\n"); System.out.println("Values …

Member Avatar for -ordi-
0
300
Member Avatar for Stefano Mtangoo

What are rules to observer when writting More than one class in single Java file. Let say three classes on the same file Thansk

Member Avatar for kvprajapati
0
136
Member Avatar for jogendar

i am creating a text editor using java swings, i have used rtfeditor kit for saving the file with styles,undo manager for undo/redo.bu tmy problem is that both are not working at a time,i.e., any one of these is only working.... can anyone say how to make both working???

0
52
Member Avatar for merrycit

How can I obtain a value from inside a for loop? I declared the variable in the method and not inside the loop. When I use the same variable in an if statement in the same method however, I get a message saying that the variable has not been initialized. …

Member Avatar for kvass
0
149
Member Avatar for ashkash

I need to take an n number of x and y coordinates from the user and figure out some information based on the inputted points (northmost, southmost, etc.) I wanted to know what the best data structure would be to store the inputted x and y coordinates and be able …

Member Avatar for jwenting
0
59
Member Avatar for smith!

hi there i really need help to write a java program on this i dont understand anything in java plzz i need help. ive put and attachment on so people could have a look at it. thanks [ATTACH]13921[/ATTACH]

Member Avatar for kvprajapati
0
109
Member Avatar for timrhon

Last minute attempts to find what I am doing wrong here. I am a beginning Java Programmer, as you will see, and need help understanding why my paint method will not draw onto the panel. So far all I have tried to accomplish is to get the circle object to …

Member Avatar for timrhon
0
193
Member Avatar for firebugg

Hi, I am having trouble getting back into a loop after an exception has been caught. This is what the program should do... Write a program that asks the user to input a set of floating-point values. When the user enters a value that is not a number, give the …

Member Avatar for firebugg
0
1K
Member Avatar for hendaz

Hi, I am trying to make a memory card game but im not sure how to get started with the GUI part. I have made the frame and the content pane etc and have a working menubar but as to how I would display 40 cards im not sure. I …

Member Avatar for Stefano Mtangoo
0
80
Member Avatar for Leigh Reed

Just started my first unit in Java and my lecturer has set some code with logical errors in it. I think I have found them all bar one. the problem that I am having is that when I run this script it should calculate the Tax for the dollar amount …

Member Avatar for Leigh Reed
-1
130
Member Avatar for merrycit

[CODE]public static boolean rentCar(String id) { for (int i = 0; i < collection.size(); i++) { return( if (id.equals(Car.collection.elementAt(i).carTypeId)) {// if the id equals to the collection.elementAt(i).carTypeId; System.out.println("Please insert the id number of the car you would like to rent>"); id = Keyboard.in.readString(); int quantity; quantity = Car.collection.elementAt(i).carInventory; if (quantity …

Member Avatar for stultuske
0
95
Member Avatar for nucleareactr

Hey all, In computer class as homework we're to create a code to find prime numbers between two values m and n without using an array (since we havn't learned about how to use them yet). so far the code I have is: [code] public static void prime (int m, …

Member Avatar for Ezzaral
0
977
Member Avatar for Clawsy

Hello, I have a script written in Java that gets me an answer from a script containing a number of files. The problem is I don't know how to code this in javaFX script as I am very new to it. [CODE] URL url = new URL(page); URLConnection conn = …

0
139
Member Avatar for anders10

Hi! I want to put up a network with a server and a client. The game shall be implemented in the server. The tictactoe game itself works fine.And I've just started to implement it as you can see from the code. There is supposed to be two players i e …

Member Avatar for BestJewSinceJC
0
141
Member Avatar for JuneM

I am trying to compile this java file and it is giving me an error say : java.lang.nosuchmethodeorror.main what could be the problem? [code=c] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class JChangeFont extends JApplet implements ActionListener { JLabel banner = new JLabel("Your Name"); int fontSize = 18; Font theFont …

Member Avatar for sincerelibran
0
214
Member Avatar for babylonlion

Hi there, All i want to do is read the jokes from a text file (using Scanner) and then write them out to three different files with three different extensions (fileName1.obj, fileName2.dat, fileName3.txt), that's part A. Part B, Create a class called FileWatcher. • This class can be given several …

Member Avatar for BestJewSinceJC
0
143
Member Avatar for laelzio.mosca

I`m trying to write a sample program in java, but the book doesn`t explain how I should write my html code to execute it, I don`t even know what I should use to write a HTML code, I looked online, but didn`t find much. this is the java code: [CODE]import …

Member Avatar for sincerelibran
0
83
Member Avatar for chern4ever

issit possible to let java obtain the path that store the specific .java file?

Member Avatar for chern4ever
0
71
Member Avatar for JuneM

I am trying to compile my java file here but I am getting 8 erros with the same sybmol : illegal start of an expression here is my coding: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class JChangeFont extends JApplet implements ActionListener { JLabel banner = new JLabel("Your Name"); int …

Member Avatar for sincerelibran
0
403
Member Avatar for shivnath

Hi all, I am doing a project work and I need to take the image(just as screenshot) of the first page of any file so that contents of that first page can be viewed by that image . And finally i want to set that image as an icon for …

0
58
Member Avatar for nonexcep

Hi there. I'm learning Java and this is a sample applet in which I try some basic drawing operations. I hit some roadblocks and I'm hoping someone can point me in the right direction. What I want to do here basically is make a rectangle with exactly 10 pixels of …

Member Avatar for gangsta1903
0
104
Member Avatar for rjsud85

how to run the javabean program.... where will be stored in bdk tools folder..... how to create the manifest file and jar file... where will save manifest & jar files in java... please give the information how to working the program.... please send the information in step wise. we are …

Member Avatar for kvprajapati
0
86
Member Avatar for purijatin

hello!When in the below code if iam using a local address instead of yahoo.com,it is executing well,but if iam not using a local address then it is giving a java.net.SocketException.I use a proxy connection and i have set my proxy for java .pl help [CODE]import java.net.*; import java.io.*; import java.io.*; …

0
51

The End.