35,618 Topics

Member Avatar for
Member Avatar for gabec94

for those of you not familiar with the rules they can be found [URL="en.wikipedia.org/wiki/Conway's_Game_of_Life"]here[/URL]: i am sort of new to java and i am trying to write the game of life, i have got the board made and how to randomly assign each cell a true or false (living or …

Member Avatar for gabec94
0
5K
Member Avatar for Grub

Hi, I have a JTable with a tablecellrenderer I have extended from the defaultTableCellrenderer. In my Table model on which the table is based, I have an algorithm that searches each cell making comparisons, when it finds rows with similar values, it adds colour A to an arrayindex and continues …

0
95
Member Avatar for weblover

hi all,how are u? ..i have an encryption project.. i have to implement some of the encryption algorithme in java but i have a problem ..it's the same in all the ciphers ..when i type the key and press encrypt the encrypted text is not right ..i make my calculus …

Member Avatar for weblover
0
99
Member Avatar for edwardtong694

Hi Guys Im having a problem. Im very new to Java and am using blueJ. I would like to displya a picture on a label when I click a button. At the moment all I can get it to do is to print a message when a button is clicked. …

Member Avatar for JamesCherrill
0
100
Member Avatar for djdanjo82

Hello All, First thanks for taking time to read my thread. My problem is I have created a Gui Class that contains multiple JPanels inside another JPanel or ContentPane. I have just now created another Gui2 Class in the same java project and I would like this new Gui2 Class …

Member Avatar for djdanjo82
0
140
Member Avatar for mrgregkid

Hello im quite new to java and have been writing this game for my computer science class. ive been getting this illegal start of expression error on line 215 which is my 2nd public class dice extends applet and can not figure out how to fix it. ive tried moving …

Member Avatar for peace_of_mind
0
85
Member Avatar for k1lguy

hello, i have a java game but i have a problem with healing i get the error client.java:2791: orphaned case case 315: ^ 1 error files compiled successfully! this is the code: [ICODE]public boolean healing() { boolean eat = false; int heal = 0; case 315: Message("You eat the shrimps."); …

Member Avatar for JamesCherrill
0
233
Member Avatar for farooq82

I am trying to develop a java program containing two threads that reads two files simultaneously. In a program, first thread reads data from file “Personal_Record.txt” and second thread reads the data from file “Academic_Record.txt”. When one thread reads a line from one file then it should allow another thread …

Member Avatar for verruckt24
0
157
Member Avatar for kvprajapati

I am confused about static class and nested class. Is there any difference to code and use of static & nested class?.

Member Avatar for JamesCherrill
0
168
Member Avatar for PhoenixInsilico
Member Avatar for verruckt24
0
150
Member Avatar for localp

i am trying to get an input from my mic, and amplify the sound, i started searching for sample source codes, and java sound amplifying tutorials, but i found none of them relevant. so how can i amplify the sound that i received as input from a mic. can some …

Member Avatar for kvprajapati
0
47
Member Avatar for anandarju

Im developing a J2EE project and also Using JBOSS 4.0.2 server,when i run the Servlet program im getting the error "The Selection Is Not Within A Valid Module". Please Reply...Thanks In Advance....

Member Avatar for kvprajapati
0
65
Member Avatar for sivak

if i click button in pqge 1 page 2 should refresh if i click page 2 button page 3 shoould refresh if i click page 3 button page 1 shoud refresh ... can any one tell me the javascript code for this plz

Member Avatar for kvprajapati
0
72
Member Avatar for christiangirl

Hey, I am trying to find a way to limit how many characters a user can enter into a JTextField. Does anyone know how to do this? Thanks!

Member Avatar for kvprajapati
0
143
Member Avatar for christiangirl

Hello, I am having problems with indexOf() and contains() they work if I put letters in the code to test, but I want it to test what the user enters. And that is not working. The user enters a letter into a JTextField, and I am storing that word to …

Member Avatar for kvprajapati
0
172
Member Avatar for JamesKox

Hello guys, I'm trying to create a method where it takes a InputStream as a parameter, reads the stream and returns the number of characters it contains as an int. I'm having difficulties with this. I've searched the internet for examples, but i can't find one that helps me with …

Member Avatar for kvprajapati
0
2K
Member Avatar for chengkochung

Hi There, We have one java class which is to do the document generating, and from the log files we found that this servlet doing the replacing the data "PK" to "Key", wondering why it doing this. 2009-05-22 12:07:24,921 [ (self-tuning)'] DEBUG rk.servlet.PDFGeneratorServlet - Replacing the PK's with Key values …

Member Avatar for kvprajapati
0
120
Member Avatar for kashn

Hi, I'm trying to figure out how can I make split read from the file and recognize how to put the strings into an array from a file, based on a new line break. Example of my txt file: [ICODE]This will be my first huge paragraph, it will contain many …

Member Avatar for javaAddict
0
218
Member Avatar for flash121

I want to read a jpg image from a file to an Image object and then paint it on my JPanel, but the image doesn't appear.I've tried drawing some other stuff on the panel (like lines etc.) and everything appeared without any problems. My code: This class represents my JPanel: …

Member Avatar for flash121
0
177
Member Avatar for Isy

I am creating a mobile game using Netbeans IDE 6.0.1 but I have a problem adding new configuration I get the following error: java.lang.NullPointerException at org.netbeans.modules.mobility.project.ui.customizer.NewConfigurationPanel.isValid(NewConfigurationPanel.java:198) at java.awt.Component.invalidateIfValid(Component.java:2740) at java.awt.Component.setLocale(Component.java:1810) at javax.swing.JComponent.<init>(JComponent.java:595) at javax.swing.JPanel.<init>(JPanel.java:65) at javax.swing.JPanel.<init>(JPanel.java:92) at javax.swing.JPanel.<init>(JPanel.java:100) at org.netbeans.modules.mobility.project.ui.customizer.NewConfigurationPanel.<init>(NewConfigurationPanel.java:96) at org.netbeans.modules.mobility.project.ui.customizer.J2MECustomizer.run(J2MECustomizer.java:304) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986) anyone know what …

Member Avatar for peter_budo
0
253
Member Avatar for custurd12

[code] import java.io.*; import java.util.*; public class lab11_2{ Scanner in=new Scanner(System.in); private int month=12; private int sum; private int value; private int rainfall; private double total=0; private double average; private double standard_deviation; private double largest; private double smallest; private double months[]; public lab11_2(){ months=new double[12]; } public void setMonths(){ for(int …

Member Avatar for JamesCherrill
0
2K
Member Avatar for gigantic

hi, i want to draw rectangle based on mousedrag event. if user dragging the mouse, then the rectangle on the applet should increase or decrease basing on current mouse coordinates. i have the following code. in the following code i am using [b]SelectionArea[/b] class which extends a canvas on which …

Member Avatar for zyaday
0
683
Member Avatar for soultrav

How do i compare an object with null? From what i've seen right now, at execution an NullPointerException will be thrown :S For example, if I have a list: [code=java] class List { private Node data; private Lista urm; public List(Node d,Lista u) { data = d; urm = u; …

Member Avatar for Zibo
0
7K
Member Avatar for Frostra

Below I described a complex polynomial which is a part of my newton method. When I define the complex number [x = new ComplexNumber (0,0)] it only returns 0 or 1. Also I have overriden the basic string format to make it look like a complex number, but it doesn't …

Member Avatar for javaAddict
0
167
Member Avatar for mohiit
Member Avatar for Poppystar

I am new to programming and am trying to create a program to access a database of DVD's. I want to input a unique code for a title and display relevant fields from that record. I am getting the error above and have spent many hours now trying to see …

Member Avatar for Poppystar
0
578
Member Avatar for lifeismusic434

Hello everyone, I am trying to update a JTable after a user clicks a button. I have a bunch of data in a TreeMap, which I then convert to a String[][], and pass to a DefaultTableModel, and then use that DefaultTableModel in the JTable. When the user clicks a button, …

Member Avatar for lifeismusic434
0
101
Member Avatar for JustmeVSI

Hi. My problem i guess it is simple but i guess I'm simple as well :). The problem is the flowing: I have a JTextFead and a search method for IDs. The IDs are 7 char long. I want to be able when the user enters 7 chars the search …

Member Avatar for JustmeVSI
0
105
Member Avatar for KirkPatrick

Just had a quick question about my code. Seems like a very simple solution, perhaps I'm just too sleepy to think straight. What I am wanting to do is if a certain index is selected in my combobox i want certain textfields to display which is apparent by the code: …

Member Avatar for JamesCherrill
0
2K
Member Avatar for Dendei

Hi me and my class are getting this problem with tim.start(); and stop. we get start to work with a button but cant stop and we can stop with the keyboard but not with the buttons bad explaination i know but have an look plz :P [CODE] /* * To …

Member Avatar for Dendei
0
126

The End.