32,204 Topics

Member Avatar for
Member Avatar for StephNicolaou

This is a connect four game and I'm trying to show the counter falling. What I have so far is this which is in a for loop: [code] while(fallingCounter == true && x[j][i] < playerTurn) { //Move the counter vertically down the grid's rows appearing to fall fallingCounter(); g.setColor(counterColour); //counterWidth …

0
105
Member Avatar for StephNicolaou

Hi, I've followed the example in my lecture notes and it doesn't work! I want to add an image to a label and then add that label to my sub north panel. I want to do this with creating a new class...I'm not sure if I need an "image loader" …

Member Avatar for StephNicolaou
0
141
Member Avatar for degamer106

The problem is that I have an ArrayList which stores objects that contain a Shape (actually a Composite shape like a Car) and (x,y) coordinates. Suppose I'm supposed to retrieve each object and the coordinates for drawing. My question is, how do I draw an Shape on the screen at …

Member Avatar for darkagn
0
101
Member Avatar for degamer106

I'm trying to put all the buttons (and their icons) into a single class. However, when I try to draw just one button in a frame, it doesn't show up. I can get it to be displayed if I instantiate the button in the same class as the Frame, but …

Member Avatar for javaAddict
0
116
Member Avatar for banditt_77

I have this program where I have use arrays to book room reservations in hotel, however I'm completely stuck on what I need to do if I wanted to cancel the rooms already and returning them to the array to be re booked. Here is part of my code. public …

0
58
Member Avatar for ravicsit

anyone is there to help me paint should using the photoshop tools by editing the images

Member Avatar for jwenting
-2
90
Member Avatar for spywx2003

if anyone can help me i need to create a JFrame that displays two text areas (JTextArea) in a grid layout (1 row, 2 columns), am not asking someone to do it for me but if anyone can help me with basics of JFrame that would be helpful thx

Member Avatar for Ezzaral
0
81
Member Avatar for StephNicolaou

I have been trying to write simple return statements and print the result of the return. I have read books such as O-Reily and have used examples but find that the examples don't work either so I guess I just need human communication!! First I have tried this return method …

Member Avatar for Dukane
0
201
Member Avatar for hgedek

I am beginner at java.I want to learn jdbc-oracle database subjects.By downloading jdeveloper and sqldeveloper I started but I couldnt connect database.So I want to start learning jdbc-oracle from begin.I need your advices.thanks.

Member Avatar for jwenting
0
71
Member Avatar for new_2_java

Hi all, In my program I am using RMI call to a service in a remote host. My program runs without any exceptions from within eclipse, since I have all the packages and jar files in my build path. However, the program needs to eventually run from the command line. …

Member Avatar for new_2_java
0
2K
Member Avatar for rushi bhatt

hey yar ... ->please help me... i want to know how to get dir list from ftp-server. ->please send me code..

Member Avatar for jwenting
-1
36
Member Avatar for Dio1080

ok, i need help adding to a list after the list have been made. Its the only thing stopping me from getting this thing done, help please.... [ICODE]import java.util.Scanner; import java.io.*; import java.util.*; public class Dairy{ public static void main(String[] args){ Scanner keyboard = new Scanner(System.in); String [][] job = …

Member Avatar for Ezzaral
0
93
Member Avatar for katharnakh

Hi, Im new to JAVA and i have a question. The following code compiles fine and executes fine. But if you assign [icode]c = '\29' [/icode], in the following code, the compilation fails. 1. How does JAVA interpret [icode]char c = '\21';[/icode] and [icode]char c = '\29';[/icode], as escape sequence …

Member Avatar for katharnakh
0
115
Member Avatar for ramjeev

Hi buddies, I m in need of IPC sample to communicate between two applications.I hav to start one app from another and I want to know whether the second is running or not.If any samples on Interprocess communication,please let me know. Thanks in advance.

Member Avatar for vidaj
0
100
Member Avatar for k_en

i have basic java programming language but i am a bit confuse about java and j2EE and i hope i can find an answer here. My questions are as below: (1) [COLOR="Red"]What the different between java and J2EE?? [/COLOR] (2) [COLOR="Red"]Can i consider myself knowing J2EE because i know basic …

Member Avatar for masijade
0
62
Member Avatar for bobweir

I'm working on a project that i can't seem to get done. when i try to write my constructors the compiler tells me it can't find the symbol. any idea why? here's the code. public class Student { String name= "XXX XXXX"; String studentid="XXXXXXXX"; String major="XXXX"; String studenttype="Invalid student type"; …

Member Avatar for masijade
0
174
Member Avatar for crazydeo

Hi, I'm a newbie at Java programming and was wondering how to align some text fields using the tab option aside from simply placing empty space to align for example: JOptionPane.showMessageDialog(null, "Type of Coffee Ordered :" + " "+ nameString + '\n' +"Number of Pounds Ordered :" + " " …

0
57
Member Avatar for ramjeev

Hi everyone, I can access com port while running application from command prompt. But, I can't while running app by clicking .jar file,rest are works fine. Is there any way to setpath programatically? Thanks in advance.

0
54
Member Avatar for ramjeev

Hi, Do u hav any idea on JScrollPane. I want to add listener for scroll ,i.e., I hav to know what & where user has clicked in scrollpane(up arrow, down arrow or in between). Or anything like scroll which would be comfortable for such usage? Pls let me know, if …

Member Avatar for darkagn
0
100
Member Avatar for hazelle

this my proj.. i need to do a program that will display the names in file.txt into jlist please help me with this... and i need a button for save,add new,cancel,and close.. after the names displayed in the list..when it clicked,,it must display its corresponding address,and contact number...thanks..hope youll help …

Member Avatar for stultuske
0
104
Member Avatar for clueless101

I can't get this to compile. It is for a homework assignment. The program asks user for 5 test scores and is to display letter grade and average test score. I was able to get the calcAverage method to work, but after adding the determineGrade method, I end up with …

Member Avatar for stultuske
0
130
Member Avatar for Rashul

The following is the program I wrote, but the result is not what is required exatly. Somebody please point me out to what I am doing wrong. The question: > Write a Java application that reads an integer value between 0 and 100 (inclusive), representing the amount of a purchase …

Member Avatar for stultuske
0
219
Member Avatar for a_iyer20

The following piece of code is supposed to add html spaces in place of leading spaces. /** * Finds all leading spaces on each line and replaces it with * an HTML space (&amp;nbsp;) * * @param s string containing text to replaced with &amp;nbsp; * @return the new string …

Member Avatar for masijade
0
2K
Member Avatar for amitahlawat20

Could someone please why do we say that the syntax of enhanced for loop (for-each) in java in streamlined. Also, my java compiler does not compile programs containing the enhanced for loop. It gives errors like: for(int x:collection) { } ^ ; expected Could someone suggest solutions to this?

Member Avatar for jwenting
0
88
Member Avatar for sagedavis

Hi all, I am fairly new to java, as well as netbeans, but I come from a VB background. I am wanting to build platform independant aps and find the need to cross over into this world of Java, and netbeans (so far) is the best visual ide I have …

Member Avatar for jwenting
0
103
Member Avatar for sayso36

Part I True/False ( 40 points , 2 point each) 1. If you have created an exception class, you can define other exception classes extending the definition of the exception class you created. 2. Using the mechanism of inheritance, every public member of the class Object can be overridden and/or …

Member Avatar for Ancient Dragon
0
367
Member Avatar for algo_man

Hi I am looking for an open source Java project such as (NotePad, Html Editor... etc) which consist of around 10 classes. I searched within source forge and I don't find a suitable one. I'll use this project in something called (Refactoring) which enhancing the code. This is not a …

Member Avatar for Ezzaral
0
77
Member Avatar for fnbhns

Dear Friends Hope all of you doing well with Java, I am new in the field of JAVA, But I am highly expecting an answer & your help that from where I can get skill test questions for simple simple code,,,,,,suppose codeing for prime number. Wish you all best. and …

Member Avatar for majestic0110
0
57
Member Avatar for majestic0110

Hi all, just a quick question.... is there ever a need to implement an infinite loop? in what situations would it be a good idea to use one (if any)? thanks for your time!

Member Avatar for majestic0110
0
153
Member Avatar for amitahlawat20

I am not able to understand why in the following program it is mentioned in my book: The value of ~a is ANDed with 0x0f (0000 1111) in binary in order to reduce its value to less than 16, so it can be printed by use of the binary array. …

Member Avatar for Phaelax
0
60

The End.