32,204 Topics
| |
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 … | |
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" … | |
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 … | |
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 … | |
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 … | |
anyone is there to help me paint should using the photoshop tools by editing the images | |
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 | |
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 … | |
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. | |
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. … | |
hey yar ... ->please help me... i want to know how to get dir list from ftp-server. ->please send me code.. | |
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 = … | |
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 … | |
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. | |
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 … | |
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"; … | |
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 :" + " " … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 (&nbsp;) * * @param s string containing text to replaced with &nbsp; * @return the new string … | |
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? | |
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 … | |
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 … | |
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 … | |
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 … | |
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! | |
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. … |
The End.