31,001 Topics

Member Avatar for
Member Avatar for Dean_Grobler

Hi there, I am getting a 'Cannot find symbol error' on an array in my "ViewContact" Class. The array has been created in the "MainScreen" class. Below I have pasted the code for both classes as to provide you with as much information as possible: The MainScreen Class: [CODE] package …

Member Avatar for Dean_Grobler
0
687
Member Avatar for aquabat

Hi everyone! Im trying to fill up a tree with the entries from a text file and I can read the file and I know how to make a tree object. I just dont know how to combine these two to populate the tree. Any ideas are appreciated!

Member Avatar for aquabat
0
5K
Member Avatar for Yutxz

[B]Hey guys! I'm doing another school project, bleh ._. The method I need help on is called isFlush. It's a boolean that needs to determine whether the hand (subDeck) is a flush or not. A flush contains five cards with the same suit. I want to know how to just …

Member Avatar for Akill10
0
66
Member Avatar for oggiemc

Hi all, Im trying to run a simple applet which prints a message to the screen..The applet runs fine on applet viewer but when i try to view it in the URL bar i get the following error: load: class Test.TestApplet.class not found. java.lang.ClassNotFoundException: Test.TestApplet.class at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown …

Member Avatar for Akill10
0
86
Member Avatar for O_mini

Hello, My assignment is to create a christmas tree using methods with defined parameters. 1) Print the tree at position 50 (50 spaces in) 2) Call the following Triangle (2,6) (six rows without the first 2 printed) 3) and the 1st row of these cut off triangles with the symbol …

0
47
Member Avatar for Slyvr

I'm working on a really basic text editor to save and open txt files. On my text area setLineWrap, it's giving me a "misplaced constructs" and "delete token" for the period and (true) For why? [CODE]/**Matthew Schrum *11/18/2010 */ import java.awt.*; import javax.swing.*; import javax.swing.border.*; import java.awt.event.*; import java.io.File; import …

Member Avatar for Slyvr
0
277
Member Avatar for LianaN

Hi! Could someone please explain me the difference between the following three approaches to inserting nodes in JTree? I cannot understand why the insertNodeInto method doesn't work in the recursive procedure (Approach Nr1), but it works if it is executed from JButton (Approach Nr2). So, Recursion itself (Approach Nr1) works …

Member Avatar for LianaN
0
385
Member Avatar for nuevoenjava

hi guys, good eveningn, ive been trying for two days now and i haven had no luck with this, im trying to compare 3 arraylists to filter by town, and age and show all the peoples names specifically from that town, heres my code any help would be appreciated. heres …

Member Avatar for nuevoenjava
0
624
Member Avatar for BuhRock

How would I go about converting a string to an integer? Say someone enters a 4 digit string. Like 1234. Could I use the place of each digit and work with it? Pretty much, I wanna get 1 from the string "1234" and put it in a variable. Then get …

Member Avatar for coil
0
176
Member Avatar for WaterBleu

Hi All, I'm looking to create video transition using java. I'm wondering if JMF is a good way to go..since I had a bad experience finding competiable format that is supported by JMF. The idea of my project is basically feed any two given video. when reach to the end …

0
48
Member Avatar for RetNaRome

Okay so I have an array of Objects.. My goal is to get the output to print every "Song" the user inputs But for some reason only the last song in the array is printing which is confusing me [CODE] import java.util.*; import java.util.Arrays; public class SongRunner1 { public static …

Member Avatar for Slimmy
0
129
Member Avatar for frankel81

I just dont know where to start on this. Can anyone lend me a hand? 4- Write a Java program to create the following array that hold the salaries of employees: 1550.8 2439.5 1800.75 2890.0 The company wants to give the employees a bonus of 30% of their initial salary, …

Member Avatar for plasticfood
0
146
Member Avatar for janakijanu

i want project titles related to computer science in latest language but i want to do projects in .net & java

Member Avatar for eliezahorre
-1
120
Member Avatar for eliezahorre

hi, so i've been looking for a string matching algorithm that gives me a "rating" based on how close the 2 strings match.. luckily, i googled and read this article: [URL="http://www.catalysoft.com/articles/strikeamatch.html"]how to strike a match[/URL] here's the original java class code [CODE=java] package strike_a_match; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; …

Member Avatar for eliezahorre
0
993
Member Avatar for Omona

Hello, First of all, I hope my post isn't breaking any of the forums' rules Here's my code so far [CODE]import java.util.Scanner; /** * * @author user */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { Scanner sc = …

Member Avatar for Gerbiler
0
536
Member Avatar for eman 22

my program doesn't work correctly because this exception [CODE]while(count<sharedBetweenThreads.size()){ for (int i = 0; (i < ourThreads.length) && count < sharedBetweenThreads.size(); i++) { if (ourThreads[i].isAlive() == false) { ourThreads[i].start(); } }[/CODE] if the length of an array of threads(ourthreads) equal 2. the two threads start and then the program check …

Member Avatar for masijade
0
80
Member Avatar for steveh000

Hi Guys I am a Computer Science student at University and am looking for some ideas on a project that I have to complete. I have to come up with an hypothetical Software engineering problem in Java , I have to create a bad way of solving it and then …

Member Avatar for skhenry
0
183
Member Avatar for sam1

hi, I am doing an instant chat system using java client and server architecture. currently im implementing the server side of it. my question is: Should i design a gui for the server side as well? if yes what kind of functionality should I include? thanks

Member Avatar for Arul412
0
208
Member Avatar for George2

Hello everyone, Please look at the following code block, [code] public void Foo() { synchronized (lock) { //do task 1 try { lock.wait(); } catch (InterruptedException e) { // TODO Auto-generated catch lock e.printStackTrace(); } //do task 2 } } [/code] Suppose multiple threads have entered the synchronized block one …

Member Avatar for anand.g
0
179
Member Avatar for lh8ca

Hi, I'm having trouble finding the right code to write a short method to create a greyscale SImage from an array of ints representing text in binary form. For example, given the array [0 1 0 0 0 0 0 1 0 1 0 0 0 0 1 1], an …

Member Avatar for masijade
0
82
Member Avatar for takercena

[CODE] for(int x = 0; x < w; x++) { for(int y = 0; y < h; y++) { int rgb = bimg.getRGB(x,y); //byte r = (byte) ((rgb & 0x00ff0000) >> 16); //byte g = (byte) ((rgb & 0x0000ff00) >> 8); //byte b = (byte) (rgb & 0x000000ff); pixels[x][y] = …

Member Avatar for masijade
0
295
Member Avatar for masamune

Hello there Can anyone lend me a hand with this question? i'm seriously not looking for anyone to solve it for me, just a simple explaination will do. I'm having trouble knowing where to start, im just a beginner and this question really caught me by surprise, I don't even …

Member Avatar for jon.kiparsky
0
106
Member Avatar for tshudyb

I have created a JFrame contaning a JTabbedPane. What I am trying to accomplish is the changing of tabs within my 'addCustomer()' class via an ActionListener. What I was trying was to call the method 'setTab(int c)' located in my 'BoatLog()' class, from my 'addCustomer()' class to set the index …

Member Avatar for tshudyb
0
1K
Member Avatar for fenomenal

[ICODE]public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("Input an integer: "); int n = in.nextInt(); int d = 1; int temp = n; while (temp > 9) { temp = temp / 10; d++; } System.out.println(n + " can be expressed in " + d + …

Member Avatar for Gerbiler
0
103
Member Avatar for LianaN

Hi! There is JTree component that I want to fill from the database. New nodes can be dynamically added to this tree. I need a procedure that will recursively traverse a tree. My problem is that [B]all nodes are added to the root node[/B], and sub-trees are not created. I've …

Member Avatar for LianaN
0
371
Member Avatar for OuSa
Member Avatar for Katana24

Hello - I have created a program which calculates the value of PI. All the calculations work well but the aim of the program is to get the user to input a number - say 7 and my program will print the value of PI to 7 decimal places. I …

Member Avatar for masijade
0
106
Member Avatar for jishent

[CODE]import java.io.*;public class Ex9a{ public void rollBack(BufferedReader in) throws IOException{ String line=""; if((line=in.readLine())!=null){ rollBack(in); } if(line!=null&&!"".equals(line)){ System.out.println(line); } } public static void main(String[] args) throws FileNotFoundException{ PrintStream out; Ex9a t=new Ex9a(); out = new PrintStream(new FileOutputStream("outfile.txt")); out.println(ioe); out.close( ); String fileName="infile.txt"; try{ BufferedReader in=new BufferedReader(new FileReader(fileName)); t.rollBack(in); }catch(IOException ioe){ System.out.println(ioe); …

Member Avatar for jon.kiparsky
0
381
Member Avatar for Oppression

Greetings reader, Thank you for your time. This post contains 2 Inquiries. My resources: BlueJ [B]Inquire 1:[/B] I would like to know what methods (if any) I can use to save anything generated by my BlueJ (e.g returned ints)to my PC's memory without having to create a .txt file somewhere, …

Member Avatar for peter_budo
0
203
Member Avatar for ARaza110

Vector v = new Vector(); i<10; v.add(new Integer(i));// what does this lien do? I dont understand, what does calling (`new Integer()`) do? Is is calling the constructor and passing the value i in it. Why can't we just pass the value i directly and add it in the vector.

Member Avatar for ARaza110
0
127

The End.