32,204 Topics
| |
hey everybody! I want to create a program that counts the number of each word in a sentence given by the user. but I dont know how it is. pls help me... | |
Just a heads up, I posted this same question on Dream in code over 2 hours ago and nobody has answered. The link is [URL="http://www.dreamincode.net/forums/topic/197275-checking-for-multiple-keys-pressed/page__p__1153044__fromsearch__1&#entry1153044"]http://www.dreamincode.net/forums/topic/197275-checking-for-multiple-keys-pressed/page__p__1153044__fromsearch__1&#entry1153044[/URL] I have been trying to figure out how to increment or decrement a value if two keys are pressed at the same time (ctrl+, ctrl-). … | |
Hello! I would like to be able to change the sequence of rows in the JTable by clicking on arrows, which will be placed on the right side of the JTable. Please, see an attached file to understand the idea. Well, could someone please give me some advices on how … | |
Hi guys first off i want to say i really enjoy this forum i just signed up but i have referenced it before. so i have a question i need help with. here is the task at hand [QUOTE]A file called [URL="http://www.cs.oswego.edu/~odendahl/coursework/csc212/201009/assignments/03/tables.txt"]tables.txt[/URL] contains ranges that describe multiplication tables. Each line … | |
I want into values into databas using java code...so send me the sample codes on that senarios using javacode i want to insert values into database ...give an idea to impletement | |
Hello, I a student and Java is very new to me. I am trying to multiply 2 numbers together to be displayed in a dialog box but I keep getting the error of "cannot find sysmbol" and I do not know what I am missing in my file to clear … | |
Hi! I have a question regarding the SQL Select and "try...catch". The problem is that my SQL Select statement could sometimes return empty sets. For this reason I'm using "try...catch" statement. However, it doesn't work - the error message is generated for the empty set. So, how could I solve … | |
hi i am creating an applet where you click on the button and it adds an image and text to a list, which then will be displayed in a JOptionPane but the Image will not display but the text does. code is as followed; Add the items [code] String additem … | |
hey guys, my code requires a toString method and an equals method. My question is, did i do them correctly? im a bit confused on this topic, Any help, im greatful for, and the toString and equals methods are at the bottom, Thank you so much. [CODE]import java.util.*; class Scores … | |
Am doing my mini project,i want to insert images in my user login pages,am not doing the project using net beans,,,can u help me by creating a page(need codes) contains a label and inserting image into it... where should i keep the downloaded image so that i get the image … | |
The below is the main method, the wrapper method, and the array search method for a step recursive method used for finding the index position of the searched string. I am encoutering this problem when whatever search I put in, I get the return value of -1. Why and how … | |
Hello. I created a JTabbedPane on a panel and put it on a JInternalFrame of a JDesktop in SetObjects.java. Why can't I get a tabbcount for it after running an AbstractAction? [b]reference JTabbedPane[/b] [code] [/code] [b]reference JTabbedPane[/b] [code] M =(" --> in controlJMenuItems("+e.getActionCommand()+") var: e.getActionCommand() : xxxxxxxx<-- \n"); System.out.println(M); jtp=SetObjects.getCurrentJTabbedPane(); … | |
Im having trouble creating a Word Decoder, Basically I'm trying to write a method that chooses a random character, and increases in by one place (a to b, b to c) and so on. Any ideas in how to approach that? Thanks, JavaRookie | |
Hey guys, thanks for looking at this. Honestly i have no clue where to start. i emailed my teacher and havent gotten a response back. Hopefully someone else can shed some light onto my problem. one of my programs i have to make is: Design and implement a Java program … | |
I need to create a menu, and then depend on the choice, carry out a certain task. But sumhow any number i put in become sumthing else so the switch become deafualt. Can sum1 help? [ICODE] import java.text.DecimalFormat; import java.util.Scanner; public class Lab0602_ATT { public static void main (String args[]) … | |
Hi, Im creating a GUI however i'm experiencing some difficulties. I want to have a text field and a button both placed inside a radiobutton. I've tried inputting ONLY the button, but the button is not displayed when i run the codes. Would be good if light could be shed, … | |
Write a program in java to a class called Employee which is having the following instance variables. name(string type) age(int type) designation(string type) salary(double type) The class Employee must have a parameterized constructor having only name as the argument and initializes the name variable. Proceed with same class.... write a … | |
hi there....recently a friend of mine asked me to convert a c++ coded pgm to java codes.... and there was a macro [#define f(x) x*x*x+6*x* ] i thought of using a function call ..but it would be undesirable for this pgm how do i get a java equivalent for this … | |
Yo - im making an animation which draws a string to a panel and moves it once the class is loaded. This all works fine but I want to change the colour of the string to white, the background will be black by the way, as well as make it … | |
Can somebody enlighten me why do i get an exception ? code is over here : [CODE] import java.io.InputStreamReader; import java.util.*; public class ObtainKey { public static void KeyAnalyzer(String input) { int idx = 0; int tokenCount; String inputArr[] = null; StringTokenizer st = new StringTokenizer(input); tokenCount = st.countTokens(); for … | |
Hi I'm new to Java, I'm trying to convert standard time to Unix time so I can use that data in Max/MSP (to modulate a tone) eventually I will allow this program to take a text file of ordinary times and write to a text file the converted Unix times … | |
hi Guys, Just started java and so far not too bad but i tried to sort out packages today and got this error. Stuck on it for hours. I'm not sure if im importing or setting up the pacakages properly but that where I'm hoping you can help... Im dealing … | |
Hi. I have a 2D array in a particular class file. Now, I want to equate a 2D array from another class to it. May I know how to do it? So far, this is what I've done: Example: [CODE]private double[][] residuescores = MatchApplet.mydouble;[/CODE] residuescores is from a class itself, … | |
Hi, I read a few post on passing arrays from one class to another but i can't understand. I tried doing it and i'm stuck with it, would really appreaciate it if you can help correct the following code: [CODE] //This is my super class public class Transport { protected … | |
Here is my code, for some reason it goes to an infinite loop when i try and adjust the highest and lowest values for the Math.Random() method. The code works fine if i do not try to change those values based on if the guess was higher or lower than … | |
Hello":) I have code and I wont your help in telling its right or wrong and what missing.... This is the question :: If the user chooses 1, then the program asks the user: “Please enter a new dictionary file name”. The program creates a new file with this file … | |
Hi, I have to write a simple Java code real quick and was wondering how to write the following macro in Java: [CODE]#define BUF 256[/CODE] | |
Hi there, A thread was started earlier about splitting up a String using the split() method of the string class. Reading that did help me quite a lot in solving a problem of mine that is VERY similiar. Say I have this in a txt file: "Dean Grobler 0794400541 NA … | |
i have a problem hoping if any one can help me. i have to do a project on data clustering with graph theory. the tool must cluster 4 disease avium, leprae, tuberculosis,and bovis. i want to have a sample java code of the mst clustering algorithm to cluster these files. … | |
Here is my assignment: [url]https://docs.google.com/document/edit?id=1lf2t8LOqKmXK8tu8lW7ghDOd1IJw9BXBRi_PDXFtPQo&authkey=CLnyu7UE&hl=en#[/url] Here are the other classes I am using: [url]https://docs.google.com/leaf?id=0B_UHOsQPEyMBNDBhMWExNTgtMTJmNy00MTQxLWI1ZGItMDZiZjM3YTZiZjRi&authkey=CP2ujcoM&hl=en[/url] I am receiving a NullPointer on line 53: regularNumbers.enqueue(i); But, I am not sure why. Additionally, I need to display my results 12 primes per line, and a space between each. Suggestions? Thanks all for taking … |
The End.