32,204 Topics

Member Avatar for
Member Avatar for Ron2794

hi all frnds m not able to use javac command in my command prompt the command prompt is saying that javac is not recognised as valid but i have installed java plz help how to solve the problem

Member Avatar for musthafa.aj
0
87
Member Avatar for bufospro

Hi, I am trying to write to a .txt file an integer but the characters I see when I open the file are strange. Could you tell me what happens ?? [CODE] import java.io.*; public class A { public static int readInt() { byte b[] = new byte[16]; String str; …

Member Avatar for bufospro
1
121
Member Avatar for gabz16

Please help me add actionlistener ect. to my puzzle program so that i can move the tiles into ascending order..Here is my code.. [code]import javax.swing.*; import java.awt.*; import java.util.Random; public class Rand { private JButton btn[]=new JButton[16]; public static void main(String args[]) { Rand app=new Rand(); } public Rand(){ JFrame …

Member Avatar for gabz16
0
229
Member Avatar for .11

Okay I am working on a quick Shortest Job first algorithm and ran into a problem. I can't figure a way to implement, each way I try I get the wrong next process. [CODE]private static int lowTIme(ArrayList<Process> testProcesss, int currTime) { int i; int temp = testProcesss.get(0).getcpuTime(); for(i = 1; …

Member Avatar for .11
0
152
Member Avatar for Hitman908

Im having trouble coming up with the java code for this. Can someone help me? First 3 month month-by-month account balance in your bank savings account. You need to make one, only one transaction-a deposit or a withdrawal-each month. Interest is added to the account at the beginning of each …

Member Avatar for masijade
0
218
Member Avatar for gravyboat

I have a number of images where there is a small rectangle on a large white background; is there a way to automatically find the non-white content and crop that out to a new image? java or other language code, commercial software, or free software would be great. If I …

0
70
Member Avatar for kooldba

I have some data like this: [CODE] 6 9 5 2 3 6 1 5 1 0 3 4 5 3 9 1 9 4 3 8 6 8 5 1 5 4 9 8 1 4 4 5 1 5 8 6 7 2 5 5 6 1 8 …

Member Avatar for javaAddict
0
114
Member Avatar for stain3d

Hello. I would like to know if anyone can help me with making a simple splash screen. Just a basic text splash, no images or popup. Just need it to where you add your name, date, etc. And it displays that, but must be outside the main(). The ones I …

Member Avatar for BuhRock
0
84
Member Avatar for arpit_

I am trying to make a log reader , which will read the log ..and the user will input a search string .. i want to get the output in a excel file containing the whole line in which this string is found [CODE]try { FileReader fis = null; FileWriter …

Member Avatar for masijade
0
133
Member Avatar for slade2627
Member Avatar for Alpdog14

I have a java project that I need help on. The program is for word occurrences and I have a basic add() and frequency() methods I need help creating, not sure how to begin. here is the skeleton I am working with: [CODE]@Override public void add(final String word, final int …

Member Avatar for LReynolds
0
251
Member Avatar for MaxWildly

I am not getting the correct output for this method. I have looked at the BigInteger class, and even tried to implement, after rewriting for my instance variable, but it did not carry the numbers over to the next digit, or bring down the remainders. Thanks in advance. [CODE] public …

Member Avatar for gunjannigam
0
190
Member Avatar for memo1

HI could any one help me to know the main idea to type program which converted from seconds to hours, minutes and seconds. thnks،،

Member Avatar for MaxWildly
0
78
Member Avatar for hightech2

Hi everyone I am trying to get this done and it is not happening :to implement the method for the is Empty and is Full. I am suppose to check for an empty stack and check for a full stack But I am not getting it? Can someone see something …

Member Avatar for coderGh
0
1K
Member Avatar for adity

Hi, I wanted to change the color of the first two rows of a Jtable .How do i achieve that? I have written the follow: [CODE] TableCellRenderer render1 = null; render1 = new myCellRenderer(); [/CODE] And the renderer is written as : [CODE] class myCellRenderer extends DefaultTableCellRenderer implements TableCellRenderer { …

Member Avatar for balmark
0
91
Member Avatar for andreokoth

Hi every one, I am new to java and am making an application where the main window has buttons and menus to be clicked.i cant find the code to use on the button so that when i click the button the window i want is displayed.e.g; i have: mainpage.java and …

0
36
Member Avatar for bokoto

Hi all, i need help with this code im trying to produce. I've been searching google for days without finding any answers so please youve got to help me understand. The idea is to encrypt a string inputted by the user I wish to increment the letters at odd positions …

Member Avatar for javaAddict
0
9K
Member Avatar for jtodd

Hey everyone. I am new to java and I am stuck in this program. I am getting error messages and cannot figure out why. On public class Rectangle I am getting error messages on lines 84, and 85. On RectangleTest line 12. Thank you all in advance for and guidance …

Member Avatar for masijade
0
136
Member Avatar for k2k

i am trying to connect to mysql database using java. I have done connecting to microsoft access before. and i modified my code to connect to mysql server locally. i think the problem is I don't really understand where my mysql database is. anybody may point out the problem would …

Member Avatar for masijade
0
710
Member Avatar for houlahan

i have a client server and i send data perfectly to the client its when the client wants to send or update data which is the problem. what i am trying to do is check to see if the object that is passed to the server has a id and …

Member Avatar for jwenting
0
189
Member Avatar for balajimarch31

can any one send me a link to get the best book to learn j2me. i have to work on some mobile games using J2ME. thanks in advance.. Balaji

Member Avatar for balajimarch31
0
41
Member Avatar for Katana24

Hi, im trying to call this method in my class "MyWidget" which is suppose to draw a line when someone indicates the coordinates via 4 parameters. Here is the method: [CODE]public void Connect(int xline, int yline, int nextX, int nextY) { Graphics g = getGraphics(); g.drawLine(xline, yline, nextX, nextY); } …

Member Avatar for Katana24
0
141
Member Avatar for MaxWildly

I need help with trying to convert a String of number to a Integer Array. I will then be adding the to Arrays together like any addition problem, but I am having trouble with just getting the string in to the arrays without it outputting jargon. [CODE] public static int[] …

Member Avatar for MaxWildly
0
616
Member Avatar for music_est_vie

Hello. I am a extreme n00b at programming in Java and was wonder if I could get some advice on how to execute some of basic commands. I am working on a group project in school (Computer Science 30) and my group is creating our own extreme basic version of …

0
63
Member Avatar for nabil1983

Okay i've created an array object with help from here like so: CdRecord[] array = new CdRecord[5]; array[0] = new CdRecord(); now i've used a while statement to write to the arrays , im writing CDName,AlbumName & NumberOfTracks... when i run my program it all works except that when i …

Member Avatar for emilchacko
1
159
Member Avatar for Sunny89

Rather than read in the sales data we will generate it randomly using the Math.random() function. Write a function called Random that accepts two parameters of type double. The Random function will generate random numbers between a range defined by the parameters, The first parameter defines the lower limit and …

0
59
Member Avatar for lrolsto1

Alright, this is for a project designed to make us use inheritance. This is Creature, which is a subclass of Thing. Creature is supposed to be able to eat, move and tell what it ate. Here are my issues: 1. How do I use a constructor from Thing in Creature? …

Member Avatar for LReynolds
0
71
Member Avatar for jxmst32

I am currently writing a program in Netbeans which will perform binary to decimal, decimal to binary, hexadecimal to decimal, decimal to hexadecimal conversions, 1's compliment, 2's compliment, and show the list of boolean algebra rules. I have created the GUI however, I cannot figure out how to make the …

Member Avatar for phoenix911
0
363
Member Avatar for jackieoh
Member Avatar for wondering_ed

[CODE]import javax.swing.*; import java.sql.*; public class BankAccountDatabase{ public static void main(String[]args){ Connection conn=null; Statement stmt=null; ResultSet rs=null,rs1=null; String url="jdbc:mysql://localhost/bankaccount"; String username="roo"; String password=""; String query="",query1=""; String accname,accnum,accpin; int PIN,key,menu,AccountNumber; String a,b,c,d,f,g,h,i,j,x,y,z; double dep,withdraw; double balance=0.0; try{ Class.forName("com.mysql.jdbc.Driver"); }catch(java.lang.ClassNotFoundException e){ System.err.print("ClassNotFoundException: "); System.err.println(e.getMessage()); } do{ a=JOptionPane.showInputDialog("MENU\n\n\n1 - Create Account\n2 - Delete …

Member Avatar for BestJewSinceJC
0
154

The End.