32,199 Topics
| |
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. | |
Java implements pass by reference right? So when I do cons("item", stack) with the following code I should print out --> itemabcd. But that isn't the case, why? String stack = "abcd"; cons("item",stack); System.out.println(stack); // public void cons(String item, String stack) { stack = item + stack; } | |
| Hi all, So i basically created a database with an arraylsit. All the data is stored in the arraylist and is added by a stringLine. [B][U]All this is shown in the code[/U][/B] My Database is an Insurance Database. Well basically i'm finding it hard to find out how to actually … |
please how do i create a login page using gui in java?And also how do i make the login page move to the next java page when the password is correct? | |
Hi everyone, I have quite a problem. I have a text pane and three menu items which are cut copy and paste. In my textpane i have some text and an embedded icon. when i select all the contents of the textpane and click cut all the contents of the … | |
Hey, I've been going insane with a question I've been doing all day. Creating an application that prompts a user to enter a date. I have to use arrays to store the number of days in each month i.e 31 for January, 28 for February etc.. I have created a … |
The End.