31,001 Topics

Member Avatar for
Member Avatar for sarathsshanker
Member Avatar for JeffGrigg
0
64
Member Avatar for pseudorandom21

I need to run some code written in Java from my personal website. How do I even begin?

Member Avatar for NormR1
0
122
Member Avatar for sirlink99

I am making a game where random obstacles appear. The obstacles will move towards you. I currently have this code to animate the obstacles. [CODE] for (int i = 0; i < obstacle.size(); i++){ // animate walls obstacle.elementAt(i).x -= 1; } [/CODE] My vector multiple instances of the Walls class …

Member Avatar for stultuske
1
109
Member Avatar for Haridha
Member Avatar for Srin

My panel's paintcomponent method draws a line based on the initial click and the current position as the mouse is dragged. Releasing the mouse leaves one line from the mouse press location to the mouse released location. The problem is. on the next click/drag, the old line disappears when the …

Member Avatar for Srin
0
1K
Member Avatar for jovialbimmer

Hello all. I have to write a java program that allows a user to enter an octal digit and output the binary equivalent for as many numbers as the person wishes using a direct access method. The error is that even though it compiles, the answer (the binary number) continuously …

Member Avatar for JeffGrigg
0
141
Member Avatar for Haridha
Member Avatar for rotten69

Hey, I'm getting this error every time I run my program. I dunno what it means and how to fix it. [code] Uncaught error fetching image: java.lang.NullPointerException at sun.awt.image.URLImageSource.getConnection(URLImageSource.java:99) at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:113) at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240) at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172) at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136) [/code]

Member Avatar for NormR1
0
246
Member Avatar for andersonelnino

1)DEFINITION OF DATA REQUIREMENTS Produce an itemised consigment note for each customer including -dimension,weight and price per parcel. -total weight and price consigment -number of parcels RESIDENT DATA -up to 2kg-£7.50 -up to 4kg-£8.00 -up to 10kg-£8.55 -up to 12kg-£9.10 -up to 14kg-£9.70 -up to 16kg-£10.35 -for each extra 2kg,up …

Member Avatar for NormR1
0
210
Member Avatar for sathya88

[code] public class exception4{ public static void method(){ try{ exception4.method2(); throw new Exception("method throw"); } catch(Exception e) { System.out.println("method Exception caught"+ e); //throw e; } } public static void method2(){ try{ throw new Exception("method2 throw"); } catch(Exception e) { System.out.println("method2 Exception caught"+ e); e.printStackTrace(); [COLOR="Red"][B]//throw e; [/B][/COLOR] [COLOR="Green"][U]if include this …

Member Avatar for JeffGrigg
0
254
Member Avatar for J-Dub

I need to know how I can set up a action listener for an array of buttons. I am trying to make a tic tac toe game. I am new to programming. I have seen someone on here ask a similar question but I could not grasp what they where …

Member Avatar for mKorbel
0
4K
Member Avatar for akasekaihime

we are ordered to create a payslip in applet but I am not able to create one for I do not know compute the gross pay, net pay and total deduction.....also I do not know the relation of the days worked,overtime worked and overtime rate to the gross pay......what should …

Member Avatar for hfx642
-1
139
Member Avatar for akasekaihime

I have created my own payslip but then when I compiled it, they said that there are no more errors but I cannot view my output on the applet viewer............ is there something wrong with my code or is the viewer at fault here?? here is my code............ [CODE]import javax.swing.*; …

Member Avatar for akasekaihime
0
317
Member Avatar for Haridha
Member Avatar for DarkPheonix

[B]Could u tell me why the following problem is coming on running the program where im getting the out twice each time wen i shd get it only once , wen im entering a input im getting the menu twice[/B] [CODE]import java.io.*; class Television{ private String MANUFACTURER; private int SCREEN_SIZE; …

Member Avatar for FireBlah
0
319
Member Avatar for rayvarde

plzz help me how can i do the 3 sorting in 1 program user input using bufferedReader plzzz... bubble sort slection sort insertion sort

Member Avatar for rayvarde
0
84
Member Avatar for vishal1949

I am making a program where i have to write a recursive function that reverses a string. I am a new programmer and need help. The function should return a String and take only one argument, also a String. [CODE]import java.io.*; public class RecursiveFunction { public static void main(String [] …

Member Avatar for JeffGrigg
1
386
Member Avatar for javinpaul

Just wondering is there any way to modify Classpath in your program and force them to include a new directory in classpath ??

Member Avatar for JeffGrigg
0
225
Member Avatar for sarathsshanker

im not able to figure out the meaning of this piece of code: [code] public int void countTokens(String s) { StringTokenizer st= new StringTokenizer(); return st.countTokens(); } [/code]

Member Avatar for stultuske
0
376
Member Avatar for Ashley256

Am trying to create a JTable application but when i try to run the program in netbeans it bring an error on the addRow() and removeRow() and yet when i run it in the commandPrompt it works well what could be the problem. below is a snippet of the code …

Member Avatar for Majestics
0
85
Member Avatar for anjoz

Hi im trying to design a program that matches wildcards example the * , ?, [], {} etc but ive read that java has its own regex support I want to manually code the matching idont know where to start or how to do the program/ design it. Can you …

Member Avatar for Ezzaral
0
76
Member Avatar for gunjannigam

I want to have two textfields which will have the following validations 1) Both should be Integers 2) The value in one textfield should be a integer multiple of other I have used two JFormattedTextFields to this. This is what i have done till now [CODE] NumberFormat updateFormat,sampleFormat; updateFormat = …

Member Avatar for mKorbel
0
259
Member Avatar for VIPERHlr

Hi, I desperately need help for my java assignment. I am required to make an encryption/decryption program using netbeans. It basically takes the users message and encrypts it into characters and vice versa for decryption. My teacher say it has something to do with using arrays. There are 2 main …

Member Avatar for peter_budo
0
133
Member Avatar for tammy12w

help im new to this.... why are get method useful?? for example why write this: [CODE]public class name { private String yourname; public void setname(String Fname){ yourname= Fname; } public String getname(){ return yourname; } public void sayying(){ System.out.printf("hello %s", getname()); } }[/CODE] when this also does the same thing …

Member Avatar for stultuske
0
116
Member Avatar for laguardian

So I'm creating a program that calculates the “Sum of Powers” after the user inputs two integers N and M. The sum of powers is computed as N^M+ N^(M-1)+ N^(M-2)….+N^0. But I don't know how to finish it. I'm kinda confused using return method, loops, etc. Here's what I have …

Member Avatar for Slimmy
0
2K
Member Avatar for ericfrank

I am trying to write a sample program that can call use the main method of "SequenceFilesFromDirectory", which aims to convert a set of files into sequence file format. [CODE]public class TestSequenceFileConverter { public static void main(String args[]){ String inputDir = "inputDir"; String outputDir = "outoutDir"; SequenceFilesFromDirectory.main(new String[] {"--input", inputDir.toString(), …

Member Avatar for NormR1
0
193
Member Avatar for muthu1802

Unix server - function(). I want to call this function through java program and track the result. help me.

Member Avatar for NormR1
0
73
Member Avatar for aman rathi

Hello everyone first of all thanks to daniweb and all users to help me lots of time. now come to problem i am learning java from last one month today i wrote a program to swap two objects it is running but not performing desired task. all instance fields are …

Member Avatar for aman rathi
0
238
Member Avatar for Aviras

Hello everyone. I just started on 'converting' my multiplayer text RPG into a graphical form. What I am trying to do is this: Create a title window, basicly just a JPanel with one image filling the space. To this JPanel I add a MouseListener. When a user clicks the window …

Member Avatar for Aviras
0
399
Member Avatar for NEEDHELPINJAVA

Hi, I'm new in this forum and I'm here to ask help on a topic the lecture I didn't turn up. I'm new to creating a search function for my Java application where the user can view the information of the books, such as title, author and the price of …

Member Avatar for Killer_Typo
0
231

The End.