32,204 Topics
| |
Hello people, I was recently working on some homework for my class, and I have a error on my code. First, I will tell what I need to do. What the program asks for is for a person to give a 3-number digit(N), from 100 to 999. After that, the … | |
So basicly i am trying to create a 2 dimensional array for my snake game but i am haveing some trouble: [CODE] public static Tile gameField[][]; [/CODE] [CODE] gameField = new Tile[FIELD_HEIGHT][FIELD_WIDTH]; for(int i=0;i<FIELD_HEIGHT;i++){ for(int j=0;j<FIELD_WIDTH;j++){ gameField[i][j] = new Tile(); } } gameField[1][1].snake = false; gameField[1][2].snake = true; System.out.println(gameField[1][1].snake+"_"+gameField[1][2].snake); //Prints: … | |
In the class diagram, we'll put attributes of our class in the section at the middle of the class' name and methods right? I'm wondering, are we also put instantiated variables in there? Like the variables instantiating other classes and buttons? | |
hi, I was wondering how can i make a new frame after the password is entered(if it's correct). Like if the user enters the correct password than another brower/frame will open. This is the program: [code]import javax.swing.*; import java.awt.event.*; import java.awt.*; public class password { private static String password = … | |
Hi, so I want to make this kind of "webpage" thing with GUI and how can go to another "page" not open another frame when I click on one of the buttons. Like in my program one of the buttons are "Sign In" and when the user clicks it I … | |
hi for all,i tried to write the memory game code but i got mistakes,can any body check them for me please? here is my code: [code=java]import java.util.Random; import java.awt.event.*; import java.awt.*; import javax.swing.*; //some things i didn't use in this game,i was just tryin ^^ public class Memorycard2 extends JFrame … | |
Hey I'm working with Java and cant seem to get my calculater working, Im trying to use my actionListener to make it all work.. Please help:) [code]import java.awt.FlowLayout; import javax.swing.AbstractButton; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.JTextField; import javax.swing.text.JTextComponent; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class … | |
Alright. I am building a chatroom client. It's using a JFrame as the main window. I wanted to add a feature, to when the window is minimized, I can hide all the components and paint the name of the client in large font. I want to do this, so in … | |
so I have 2 methods, 1 with an argument the other without command_hello(String sender); command_hello(); I am trying to invoke the method using just their name: command_hello I can do this by using the following for the method with no arguments: getClass().getMethod("command_hello").invoke(this); Works! Great! But the moment I try getClass().getMethod(cmds.get(cmd)).invoke(this, … | |
Hi everyone, basically the problem i have is; when the program loops around for the 2nd, 3rd etc it resorts the swip back to the inital value of 1000, rather than what i want it to, the ewip from the previous day. I have underlined/highlighted the two bits i mean. … | |
Hi, when i run my java program it has that little java coffee cup image in teh task bar. All my apps have this. i guess its default. How do you set that to something custom? i cant seem to come up with teh proper name for what that image … | |
I have seen many JavaScript applications of this being done on the internet and would like to create on designed on Java. As I am new to this, I have no clue on what to do. I have a fair idea and so far I have this: package dice_game; import … | |
Hi all, I'm new to Java and going through a steep learning curve. Every now and then I'm getting dead stuck, so your help is immensely appreciated. So, here's the problem: (with Java NetBeans IDE) I have a JFrame form, and in it 4 JComboBox'es. Also a JButton titled "Enter". … | |
Hello again I made a new user name because I couldn't access using the previous one; I don't know why!! Any way this is the java code of the memory game (solitaire) . Actually I compile it and run it, but it didn't work !!!! could anyone pleassse help me … | |
Hello from Ireland, In NetBeans I created a class that extends JFrame called “SearchCustomerPage”. The class has a JButton called “Search” that has an ActionListener associated with it (so when I click “Search” a method is called). I have another JFrame page (“NewBookingPage”) that creates bookings. To create a booking … | |
Hey i am trying to start using an interface in my java programming do recommend i if i start by try creating my own or i download one if i should download which would you recommend. Thanks | |
I am to create a superclass that has at least two data fields, a constructor and two other methods. Create two subclasses that inherit from the superclass each one of which adds at least one more field and at least one more method, one of which must be an 'over-riding' … | |
hello i want to replicate this form [url]http://i77.photobucket.com/albums/j74/bertyhell/layout.png[/url] the top is just the form the lower one is how i'm triing to do it 'red' is a boxlayout and the green parts are panels with normal flowlayouts i cant seem to get the alignment right this is what i got … | |
Hi There ! I want to prepare SCJA certification and i need your help and guidance Please! if some has complete course or book for that ,i will appreciate it ... Thank you for All | |
Hi all. Every now and again I get these Java update messages, which (if I choose to) in stall the latest JRE. In the C:\Program Files\Java folder, I have: One folder named: 'jre6' Several named: 'jre1.60_' and then a number (01, 02, etc.) I presume that the folders 'jre1.60_...' are … | |
hey i select any image from combobox.. the label should updated to display that image.. i tried this code. I am not getting through., Just see dis.. please help me... reply fast.. its urgent.. [code] import java.awt.*; import java.awt.event.ItemEvent; import javax.swing.*; public class x extends JFrame { JLabel l; ImageIcon … | |
Hi, here is my problem. I have the next task //Write a program that removes from a given //sequence all the numbers that present in it odd //number of times. Example: //{4, 2, 2, 5, 2, 3, 2, 3, 1, 5, 2} {5, 3, 3, 5} The problem comes in … | |
Hi I have selected to create a Robocup simulation team as my final year project. and i want to do it in JAVA. even though my interest is AI area i have no idea how to start this project. im still in my research time so have some time to … | |
[CODE]import java.io.*; import java.util.*; class Telefon { public static void main(String[] args) throws Exception { /* IO */ BufferedReader sisend = new BufferedReader(new FileReader("telefon.sis")); // IN PrintWriter valjund = new PrintWriter(new BufferedWriter(new FileWriter("telefon.out"))); // Out int n = Integer.parseInt(sisend.readLine()); // Reading first integer String abi; String abi2; String[] numbrid = … | |
I have a class which extends LinkedList and implements Runnable. I also have a main class which modifies the extended LinkedList. So, the issue is, the LinkedList is being modified by 2 threads: main() in the main thread and run() in the thread which is created from implementing Runnable An … | |
I have a gameboard class: class gameboard extends JInternalFrame In the constructor i have the line: setDefaultCloseOperation(DISPOSE_ON_CLOSE); my gameboards are actually in an array myboards[500] were each is an object of this class. the deal is I want to be able to tell which are open and i want to … | |
It says error in line 13, code 0, object expected, the clicking on member login does not show login and password text box :-( . | |
how can you make a program in java that can count a numbers of vowel and consonant? please help me... | |
Hi guys This is my first time to post in this forum. And I'm glad to be a member in this useful forum... Actually I've read the announcment that was posted by the forum Qeen regarding bringing assignments and expecting others to solve them; And I think this is a … | |
i am a student of mcs and doing my project in the agent technology.but there is problem that how the agent monitores the user activities and propose the required solution for them.can any one help me that how can monitor the activities using java code. |
The End.