32,204 Topics

Member Avatar for
Member Avatar for sean12

Im having trouble with an assignment that I was given. here is the assignment and the code I have so far. The Telephone Lookup application The task The goal of this assignment is to design and write a program that does a telephone lookup. The program reads a data set …

Member Avatar for BestJewSinceJC
0
208
Member Avatar for jismtu

Hi i am doing a project in java netbeans. I have connected a bluetooth devie with my computer now in netbeans if i press scan button so computer should scan and find blutooth device near to it. Is that any one who can help me how to create such a …

0
26
Member Avatar for ttboy04

Hello, What I want to do is reset the pig's position to 0 and it's colour to pink. I don't how if I amended the the constructor correctly so the final line sends a resetCount() message to the newly created Animal object. The above code is not working because nothing …

Member Avatar for ttboy04
0
268
Member Avatar for rena0514

i am trying to create a tic tac toe GUI but i am having trouble...here is my code: [CODE]import javax.swing.JFrame; public class TtTDemo { public static void main(String[] args) { JFrame frame = new JFrame ("TicTacToe"); frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); frame.getContentPane().add (new Main()); frame.pack(); frame.setVisible(true); } } [/CODE] [CODE]import java.io.BufferedReader; import java.io.IOException; …

Member Avatar for peter_budo
0
387
Member Avatar for bbetzel

So I need to make an 8x8 grid, that each square intitially is white, but when the mouse is clicked in one of the panels, it is changed to a random color. I started with a gui then input 64 individual panels, but is there an easier way to do …

Member Avatar for JamesCherrill
0
34
Member Avatar for anjal_pawar

Write a program to print * / * / * / * / * / * / * / using two child thread. One thread responsible for printing * and another for /

Member Avatar for MaraShyla
0
166
Member Avatar for bigbags911

[CODE]public class TicTacToe3 { public static void main(String[] args){ } int input = 0, turn = 0, mov = 0; String sq1; int[][] table = new int[3][3]; int play; public void table() { for (int row=0; row < 3; row++) for (int col=0; col < 3; col++) table[row][col] = ((row …

Member Avatar for parry_kulk
0
98
Member Avatar for senormateo2011

[B][I]Write a program that allows the user to display 1, 2, or 4 images in a grid of panels. At program startup, the user is prompted ofr the number of images. If the input number is not 1, 2, or 4, the program quits with an error message. Otherwise, the …

Member Avatar for biedi
0
293
Member Avatar for bahr_alhalak

[COLOR="red"]Hi every one, I need ur help on this part of my project i cant know to solve it and i done what i can....[/COLOR] the problems are: 1- the time must be update with time of computer but i cant do it just I take the current time??? 2- …

Member Avatar for bahr_alhalak
0
110
Member Avatar for Nirupams

Dear all, How do I set particular color in a specific cell in JTable using Netbeans ? I have searched using google but not found any significant answer. Thanks and regards, Nirupam.

Member Avatar for moutanna
0
141
Member Avatar for Usmaan

G'Day Everyone. I was wondering whether someone can help me with my Java project. I have two interfaces, say: Interface1 and Interface2. On both interfaces, there is one JButton. When the Jbutton is clicked, the current window closes and the other one opens up and vice versa for the other …

Member Avatar for Usmaan
0
86
Member Avatar for adity

I have a table that outputs certain rows.But they are from different groups and the different groups are stored in different vectors.At present i am adding all the rows using the following code : [CODE] m_vector.addAll(match1); m_vector.addAll(match2); .. m_vector.addAll(matchn); [/CODE] Here match 1 to match n are the different sections.I …

Member Avatar for javaAddict
0
179
Member Avatar for pirateninja1111

how would i keep adding a random integer to the end of an arraylist? the amount of random numbers to be added is not set

Member Avatar for jwenting
0
85
Member Avatar for girlymind

can u help us to solve this problem ')' expected in line 4 this is my error in this program...pls help me.... [code]public static void removeFile(){ String ans=" "; try{ System.out.print("are you sure you want to delete this file ["my file+"]y=yes/n=no"); ans=stdin.readline().Trim(); if(ans.equals("y")){ if (myfile.exists()){ } myfile.delete(); } else System.out.println("Successfully …

Member Avatar for masijade
0
61
Member Avatar for saggykulji

import java.util.Scanner; import java.util.Deque; public class MyDeque { private int maxsize; private int [] queArray; private int front; private int rear; private int nItems; public MyDeque (int s) { maxsize = s; queArray= new int[maxsize]; front=0; rear=-1; nItems=0; } public void insertFront(int j) { if (front==0) front=maxsize; queArray[--front]=j; nItems++; } …

Member Avatar for javaAddict
0
582
Member Avatar for bigbags911

[CODE] public class TicTacToeGame { public static final int board_size = 3; // number of rows or columns in the board public static void main(String[] args) { char board[][] = new char[board_size][board_size]; // the game board TicTacToeGame p1 = new TicTacToeGame(); // create the players TicTacToeGame p2 = new TicTacToeGame(); …

Member Avatar for javaAddict
0
74
Member Avatar for abdulraqeeb33

Hi, I have an android application that requests a list of objects from a servlet. The first time I run the android application it works fine by sending the correct list. But when I run the application for the second time, it returns the list that it has already sent …

Member Avatar for jwenting
0
115
Member Avatar for john2342

Hi, what does this code exactly do? implements other class to have the same methods, and then compares two objects of x with y and then returns it to back to the other class?? [CODE]import java.util.*; public class TableComparator implements Comparator<customerTable> { public int compare(customerTable x, customerTable y) { return …

Member Avatar for vchandra
0
104
Member Avatar for Imberto

Hello, i'm having trouble getting this program to work. It works when i just directly put in the file name, but when i try to use args and i pass it threw the command line. i can't get it to work. I've been testing stuff but i can't seem to …

Member Avatar for Imberto
0
107
Member Avatar for Tinabaalan_IT
Member Avatar for jwenting
0
84
Member Avatar for the_preface

Basically I want my program to change the current price of an object with a new one, but I'm having trouble doing so. Here's my code: [CODE] //----------------------------------------------------------------- // Updates the product's price. //----------------------------------------------------------------- public void setPrice(double newPrice) { this.newPrice = newPrice; } [/CODE] [CODE] //----------------------------------------------------------------- // Changes the price …

Member Avatar for BestJewSinceJC
0
130
Member Avatar for lwschjang

Basically, I have a price quoter that I am working on. The way it should work is: The user selects the quantity of cards from the combo box. In the textfield a price displays once selected. (i.e. 100 = $8.95). (I have this segment working already.) Next the user selects …

Member Avatar for moutanna
0
124
Member Avatar for pirateninja1111

so all i want to do is roll 1 die repeatedly and add it to a total until the total is equal to or greater than 31 this is what i have got to so far [CODE] import java.io.*; import java.util.*; public class comp { public static void main(String[] args) …

Member Avatar for Sephladaj
0
113
Member Avatar for kjaved373
Member Avatar for BobbieJean

Hi, I'm supposed to write a program using super and subclasses to calculate monthly payroll for 5 employees. There are 4 types of employees, salaried, hourly, commissioned, and base plus commissioned. Anyway, I've gotten it to build with no errors and it runs almost like it should but since it …

Member Avatar for kvass
0
2K
Member Avatar for BobbieJean

[COLOR="Red"]Hello, I had put this question in another thread and I got a response that seemed to explain it well but I just seem to keep going in circles and I'm still just not getting it. So I need some more help. The other thread started getting pretty lengthy so …

Member Avatar for javaAddict
0
179
Member Avatar for Old Geezer

Hey Gang; I'm new at this college thing, it's been a while. Need help trying to figure out why I am getting <identifier> errors. Here's my script. would sure appreciate any help you can give. Thanks ///////////////////////////////////////////////////////////////////////////////////// [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TicTacToe extends Frame { …

Member Avatar for Old Geezer
0
116
Member Avatar for ku95

currently writing a program, and for some reason I'm getting these two errors which are really bugging me. I've tried adding the brackets and changing the statement and still no luck. If there is a possible solution that would be grateful. [B]Please note that I have solved the bracket error, …

Member Avatar for Dukane
1
148
Member Avatar for palurishi

code for saving javascripts info in data base whats the procedure rishi waiting for ur reply<EMAIL SNIPPED> sql server 2005 database vb.net

Member Avatar for kvprajapati
0
43
Member Avatar for alok4u

Hello friend... i'm doing a j2me proj it is "banking application on mobile(using netbeans nd mysql database)" as my final yr proj... as i'm a fresher,i hv no clear idea about j2me.....my proj hv following specification. 1.login 2.balance enquiry 3.fund transfer 4.view mini transaction.. I'm able to login user successfully...bt …

Member Avatar for alok4u
0
79

The End.