32,199 Topics

Member Avatar for
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
575
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
Member Avatar for CSE Dunmond

I am having a problem with my program it has NO syntax errors but when I right click the class the "void main String [] args" option dosent appear so I cannot test my program I have no idea what it wrong PLEASE HELP [code]import java.awt.*; import java.awt.event.*; public class …

Member Avatar for kvass
0
106
Member Avatar for NightOwls

Like the title says I need help to display a doubly linked list in a forward order. No matter what I do, I can just get it to display in its regular reverse order. Here's the code: [CODE]public class DoubleLinkedList { private Node h; public DoubleLinkedList() { h = new …

Member Avatar for NightOwls
0
510
Member Avatar for the_preface

As the title of the question states, my program is not able to store an integer from a seperate text file provided. For instance, instead of printing the desired output: "$45.00 17 2222 Chuck Taylor All Star" It prints: "$45.00 17 0 Chuck Taylor All Star" So even though I …

Member Avatar for vchandra
0
350
Member Avatar for beanboy

hi, I'm trying to insert values from a java page in to a mysql db the foll is the code [CODE] i1=st1.executeUpdate("insert into commissiondtls(CompanyCode,BranchCode,LineNo,PartnerCode,CustomerName,InvoiceNo,InvoiceDate,InvoiceAmount,ReceivedAmount,CommissionPer,CommissionPayable,PaymentRef,PaymentDate,InstrumentNo,InstrumentDate,BankName,BankBranch,CommissionPaid,Narration) values('"+CompanyCode+"','"+BranchCode+"','"+commissionDtlsmaxid+"','"+PartnerCode+"','"+CustomerName[i]+"','"+InvoiceNo[i]+"','"+InvoiceDate[i]+"','"+InvoiceAmount[i]+"','"+ReceivedAmount[i]+"','"+CommissionPer[i]+"','"+CommissionPayable[i]+"','"+Paymentno+"','"+Paymentdate+"','"+chequeOrDdNo+"','"+chequeDate+"','"+bankName+"','"+bankBranch+"','"+Amount+"','"+narration+"')throws SQLException"); [/CODE] this doesnot insert values or shows any exception,. what do u think might be the prob? pls help [CODE] public void CommissionDetailsSaveTransaction() { …

Member Avatar for beanboy
0
189
Member Avatar for jeanfrg

In my previous post I asked the forum to help me make a race with an existing program I had made. I figured out a way to do this but now I got an error and I cannot solve it. If you need any additional information just ask ^_^

Member Avatar for white feather
0
100

The End.