32,204 Topics

Member Avatar for
Member Avatar for roseannes

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...

Member Avatar for roseannes
0
75
Member Avatar for xterradaniel

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-). …

Member Avatar for Taywin
0
159
Member Avatar for LianaN

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 …

Member Avatar for LianaN
0
109
Member Avatar for Oblivious21

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 …

Member Avatar for Oblivious21
0
626
Member Avatar for hari jagadish

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

Member Avatar for SasseMan
0
56
Member Avatar for Javagirl2010

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 …

Member Avatar for javaAddict
0
247
Member Avatar for LianaN

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 …

Member Avatar for LianaN
0
628
Member Avatar for jdiddy

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 …

Member Avatar for jdiddy
0
528
Member Avatar for oceanside013

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 …

Member Avatar for JamesCherrill
0
164
Member Avatar for priyankayou

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 …

Member Avatar for masijade
0
75
Member Avatar for flyingcurry

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 …

Member Avatar for flyingcurry
0
165
Member Avatar for ceyesuma

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(); …

Member Avatar for ceyesuma
0
153
Member Avatar for JavaRookie88

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

Member Avatar for Eric Cute
0
176
Member Avatar for frankel81

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 …

Member Avatar for Eric Cute
0
102
Member Avatar for kyojin

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[]) …

Member Avatar for Eric Cute
0
91
Member Avatar for yap_1991

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, …

Member Avatar for di2daer
0
176
Member Avatar for hassin

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 …

Member Avatar for masijade
0
157
Member Avatar for alwinnjavaroor

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 …

Member Avatar for Ezzaral
0
96
Member Avatar for Katana24

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 …

Member Avatar for Ezzaral
0
103
Member Avatar for hatux

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 …

Member Avatar for hatux
0
129
Member Avatar for ponens

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 …

Member Avatar for di2daer
0
128
Member Avatar for Spiderpig085

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 …

Member Avatar for Spiderpig085
0
208
Member Avatar for Sunshineserene

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, …

Member Avatar for JamesCherrill
0
157
Member Avatar for wilsonz91

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 …

Member Avatar for JamesCherrill
0
6K
Member Avatar for ryan400

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 …

Member Avatar for ryan400
0
1K
Member Avatar for mallak alrooh

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 …

Member Avatar for JamesCherrill
0
139
Member Avatar for wolfcode

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]

Member Avatar for alwinnjavaroor
0
387
Member Avatar for Dean_Grobler

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 …

Member Avatar for Dean_Grobler
0
173
Member Avatar for youvrajsingh

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. …

0
45
Member Avatar for CompSci_Guy

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 …

Member Avatar for haranaboy
0
158

The End.