32,199 Topics

Member Avatar for
Member Avatar for dylgod

Hi am creating a simple Java calculator and I keep getting the error: DylCalc.java:21: cannot find symbol symbol : variable Total location: class DylCalc JOptionPane.showMessageDialog(null,value1+" - "+value2+ "="+Total); ^ Here is my code is anyone has any Ideas: import javax.swing.JOptionPane; /** This program is a simple Addition, Subtraction, Multiplication and …

Member Avatar for Victor C.
0
78
Member Avatar for nie2ks

i try to remake some project from [url]http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html[/url] And i want when i click on the picture. Image in JViewarea automatic move without click on JScrolBar. But i don't know how to implement this... Can somebody help me?? Thanks...

Member Avatar for NormR1
0
32
Member Avatar for sfrider0

Say I have a pac-man applet and I have a counter that increments every time a dot is eaten, and I want to save that for every player, for every game, so there will be a total number of dots eaten from everybody combined. The counter will never reset, just …

Member Avatar for NormR1
0
173
Member Avatar for jaysean

Hello forum, I am wondering if it is possible to do a mark-up in free text by comparison with some string. Suppose I have a file with several sub-strings, one in each line. I have another file which contains the full text from where the sub-strings are generated. Is it …

Member Avatar for jaysean
0
101
Member Avatar for CoffeeRookie

Hi I am working on a dice game. I want to make a counter for the number of times the 2 dices roll and the output of the 2 dice.It should be something like this. Roll#1 1 4 Roll#2 2 5 Roll#3 4 6 Roll#4 2 3 It can only …

Member Avatar for NormR1
0
86
Member Avatar for ippomarley

[code]import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; import java.io.*; class ll{ public static void main(String[] a) { FileReader fr; try { fr = new FileReader (new File("C:\\University Study\\Component Engineering\\Assignments\\Assignment !\\yourFile.txt")); BufferedReader br = new BufferedReader (fr); String line = br.readLine(); while (line != null) { System.out.println(line); line = br.readLine(); …

Member Avatar for peter_budo
0
128
Member Avatar for valatharv

Please suggest if there is any best way around on executing jar from java code then killing parent java code. a)I have desktop based java application say "Monitor.java" which runs every 5 minutes. b) How can I [B]START external java application[/B] say "execute.jar" from Monitor.java [B]THEN EXIT/KILL[/B] Monitor.java I tried …

Member Avatar for valatharv
0
14K
Member Avatar for noon580

I have a problem with solving the follow question. Write a SortedMerge() function that takes two lists, each of which is sorted in increasing order, and merges the two together into one list which is in increasing order. SortedMerge() should return the new list. If there anyone could help me …

Member Avatar for masijade
0
116
Member Avatar for pi_lord12

So to get practice writing applets, I tried to write one that simply draws a chessboard in a 160 x 160 window. I am pretty sure I got the code right for both the html and java files, and I have the html file in the same directory as my …

Member Avatar for pi_lord12
0
118
Member Avatar for ceyesuma

Hello Could someone tell me if I had a table and I have the meta data for the columns,could I somehow collect the table name,column name and the data type and save it in something so as I could have these attributes to draw from in other classes? Thanks

Member Avatar for NormR1
0
72
Member Avatar for miraj0072004

hey all, i am trying to add a harvest plugin to the config.xml in cruisecontrol...but when I do that i get the error stating that "allfusionharvest.class" is missing...when I checked the classes indeed it was missing...how should I resolve this?

Member Avatar for NormR1
0
66
Member Avatar for jakx12

How would one get the values from a wav file. Would you use a data stream or audio stream? Thanks, jakx12.

Member Avatar for jakx12
0
68
Member Avatar for Krefie

Ola! This is my first post so i hope its not a stupid one ^_^ ok, I have large quantities text i want to read into my jTextArea, to keep it all nice and clean i use tabs(6 chars long), the problem is that sometimes the words or strings get …

Member Avatar for Krefie
0
171
Member Avatar for jt86442

[B]Hi guys, How can we add background colors in PDF document while generating to pdf form by using java. If you know, could you please share to me[/B]

Member Avatar for NormR1
0
68
Member Avatar for red_evolve

Hi. I have just been introduced to string tokenizer in one of the java lessons. It can remove characters from an array of strings. So, I am wondering if it could remove a string from an array of string. For example: "the fish was eaten by the cat". I'd like …

Member Avatar for skylover87
0
543
Member Avatar for hkeng08

Hi all, I know there's OCR to extract text from image, but is there any technology or classes in java that allows us to extract chinese characters from image?? I understand that OCR could only extract just barcodes and ascii characters from image.

0
49
Member Avatar for BestJewSinceJC

Problem: when the user prints the JTextArea, the text at the right-hand side of the "paper" is cut off, despite the fact that it is visible on the screen. Question: How can this be solved? I've tried two ways of printing the text area, and neither has worked as I'd …

Member Avatar for Krefie
0
501
Member Avatar for SimpleIntellect

This is the error I'm getting. Exception in thread "main" java.lang.StackOverflowError at knapsack.knap.knap(knap.java:16) I would really apprciate the help. Thanks in advance. [CODE] package knapsack; import javax.swing.JOptionPane; public class knap { static int N; // Number of items static int [] size; static int [] val; static int [] maxKnown; …

Member Avatar for NormR1
0
161
Member Avatar for j_kathiresan

Hi, I'm having a very large string which as below -------------------------------------------------------------------------------- EQD+CN+SAMPLE18767+2200+++5' NAD+CA+FIR:172:20' DGS+IMD+3.2+2346+55:CEL' FTX+AAA+++GOOD' FTX+AAA+++ONE' .... .... EQD+CN+SAMPLE18795+2200+++5' NAD+CA+TIR:172:20' DGS+IMD+3.2+2346+55:CEL' FTX+AAA+++SECOND' FTX+AAA+++IS FAIR' .... ... similarly FTX+AAA as above and it goes on -------------------------------------------------------------------------------- i tokenized each segment with delimiter as ' and able to read each segment. Now …

Member Avatar for nbaztec
0
166
Member Avatar for chris evans

Hi, im working with the Java Regex class and so im parsing some text. each piece of text is in a separate line. here's a sample of the text: this is textHello world buzzinga! Makmende says hi Makmende has poked u. dnt try poking him back! young, forever young another …

Member Avatar for leverin4
1
143
Member Avatar for bryan69

hi, im trying to compare the md5 key of a file selected with the md5 key of known files stored in a text file. i can get the md5 key of the file selected and all & also read the text file line by line however, i cant seem to …

Member Avatar for NormR1
0
1K
Member Avatar for ubi_ct83

Hi guys... Thanks for viewing my thread and hopefully u could reply a thing. i have this: input: -i 2,3,4,5 [CODE] public class Main { public static void main (String [] args) { static int value[]; static no_of_parameter; for (int i=0;i<args.length;i++) { if (args[i].equals ("-i")) { String value_str = new …

Member Avatar for ubi_ct83
0
102
Member Avatar for vanitha ravi

hey guys i wants to know about the basics of JAVA because i am here going to study that subject i want a basic reference book please help me

Member Avatar for javaAddict
0
50
Member Avatar for iskalabatoto

hello everyone,i'm really new at java...but they said that an I.T student like me should learn and apply Java very well.I always try my best( as every1 do) to learn and apply Java codes or whatever...but this time,i'm very confused.this is related to incrementing and decrementing values. our Instructor ordered …

Member Avatar for peter_budo
0
213
Member Avatar for farukdeni
Member Avatar for snehalata86

Hi all, I am new to JasperServer.I have been trying hard to create a simple jasper report using single value prompt.But it is giving error when I run it. Please can anyone give me steps to create a jasperserver report using single value prompt??? Please help me

0
52
Member Avatar for vanitha ravi

hey guys i wants to know about the basics of JAVA because i am here going to study that subject i want a basic reference book please help me

Member Avatar for naziatarannum
0
66
Member Avatar for techgirl87

Hi, I have a complicated situation. I am signed up for a CS420 course (Data Management Systems) this summer, although I haven't completed 2 of the "prerequisites" for the course which are a 100-level Java course and a 300-level 'Data Structures' course. I am taking the course at a small, …

Member Avatar for darkagn
0
255
Member Avatar for OffbeatPatriot

I'm trying to use generics in some methods and Netbeans is telling me I'm doing it wrong. It tells me that the lines ***Data = input is wrong and return ***Data[index] with errors to the effect of, required: byte[] found: T[] or required: T found: byte Is there a way …

Member Avatar for OffbeatPatriot
0
90
Member Avatar for Zetlin

Alright guys, so right now I'm working on a program that finds the current focused window and adds a KeyListener to it. The problem is that unlike when you have a window running and you add a KeyListener to it and it stays working until you close the window, once …

Member Avatar for moutanna
0
199

The End.