32,199 Topics

Member Avatar for
Member Avatar for Sunshineserene
Member Avatar for Kerrai

Greetings from a new Java coder. I have ran unto a problem that i cant seem too solve on my own. And since next class is on Tuesday i hope you can help me out. When i compile this i get an error on "Line 57 : "Scan cannot be …

Member Avatar for musikluver4
0
225
Member Avatar for pennylynne

Hi, I'm working on a program with GUI and I'm having a fair amount of trouble with the following code. As you can see below, I have an application and a support class. [CODE]import javax.swing.*; import java.awt.*; import java.awt.event.*; public class StyleOptionsPanel extends JPanel { private JLabel saying; private JCheckBox …

Member Avatar for pennylynne
0
114
Member Avatar for jknapp06

Hello, I'm in a software design class and we are using java; I've taken other programming classes and I'm familiar with a few other languages but that's the problem. I feel like I'm missing the point of java. I don't even know the term for it...but the java style I …

Member Avatar for JamesCherrill
0
136
Member Avatar for Wootens

Hey guys, I'm working on this program. It should roll 2 separate die and repeats until the computer rolls doubles. I'm having some issues with it and could use some help. [CODE]// RollDoubles.java // import java.util.Scanner; public class RollDoubles { // Dice roll repeatedly until computer rolls doubles // print …

Member Avatar for Darryl.Burke
0
123
Member Avatar for croc85

HI guys, I would like to create a Java file based on the information from an XML file. I would like to read the info from an xml and generate a class and it's method. e.g [CODE] <person> <name>croc</name> <surname>crocky</surname> <age>12</age> </person>[/CODE] then it should generate: [CODE] public class Person …

Member Avatar for Darryl.Burke
0
562
Member Avatar for amitbhanot

Hi. I am trying to create a stand alone app but stuck somewhere. When i click on a JCheckBox, it opens up another frame window. in this window if i click cancel then the JCheckBox in the previous frame is not checked. but if i click OK then this JCheckBox …

Member Avatar for amitbhanot
0
130
Member Avatar for aliskov

Hi, I found a very useful app on the web. Downloaded the .class file and was just wondering if it would be possible to somehow put that app on my phone. It's a Nokia E5 and I'm certain it has java. Please advise. Thank you.

Member Avatar for aliskov
0
147
Member Avatar for rizla777

Hey Everybody I'm just confused on something for my tic tac toe game. I have to make one in a java gui and im just confused as to how i should go abouts displaying the buttons on the board. What i'm trying to say is why is it better to …

Member Avatar for NormR1
0
126
Member Avatar for emko

Hello, I have to write a program that prompts the user to enter a phone number expressed in letters and outputs the corresponding phone numbers in digits. The user can use lowercase and uppercase letters, as well as spaces between words. And I am supposed to use the charAt method …

Member Avatar for emko
0
4K
Member Avatar for y2kshane

im developing a language converter so i want to do like this source | target (this is only example) aa | q bb | w cc | e im using netbeans ide i have a one textfield for input strings and textarea(i used textarea becoz i dont know how to …

Member Avatar for NormR1
0
170
Member Avatar for jssutton11

I am trying to write an algorithm that finds the Lagrange polynomial given a set of points, in quadratic time. I don't necessarily want the code to do it, just an explanation on how to write this algorithm in java in quadratic time. I know the equation, its relatively simple, …

Member Avatar for NormR1
0
138
Member Avatar for djdanjo82

Hello Everyone! First of all thanks again for viewing my thread. I was hoping someone could give me some good advice or point me to some code examples of java code calling an Ant JUnit Target if that makes sense. Basically I have a very basic java gui that upon …

Member Avatar for Jolint
0
467
Member Avatar for PDB1982

I can't figure out what the error means that I keep getting on my loop. I have it set to only take 5 arguments, which is my limit, but I can't tell what it's saying: [code] Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4 at Duplicates.EnterNumbers(Duplicates.java:20) at Duplicates.main(Duplicates.java:28) [/code] Here's my code: …

Member Avatar for kvass
0
152
Member Avatar for krbenet

trouble putting together program for designing catface that will resize in the frame import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; import java.awt.geom.Ellipse2D; import java.awt.geom.Line2D; import javax.swing.JPanel; import javax.swing.JComponent; import javax.swing.JFrame; import java.util.Random; import java.awt.geom.Arc2D; import java.awt.BasicStroke; /** * A component that draws a Cat Face. *@Kevin Bennett */ public …

Member Avatar for NormR1
0
959
Member Avatar for supreet1986

Hi friends i need ur help. i am learning asp. but now i am goin to face some java question so plz help me in solving these 4 questions.

Member Avatar for NormR1
-1
73
Member Avatar for njjay65

Hello I am a new java student. I have a lab in which we have to compare strings to see if they are anagrams. When I compile it I'm not getting any errors but its not running as it should or as it was running the other night. I have …

Member Avatar for NormR1
0
190
Member Avatar for keanoppy

Hi all, I'm doing sentence scoring. Let say,i have a paragraph with several sentences.Each sentence has a score(type double). Hi,I'm programming java (this sentence score:1.2) It's nice to code (this sentence score:0.3) Not so nice when having problem (this sentence score:0.8) What kind of structure should i use to ease …

Member Avatar for ~s.o.s~
0
88
Member Avatar for enfamos

I am in my second week of java programing and after reading the chapters I seem to be a bit lost this weeks assingment is [I]• Create a non-GUI-based Java application that calculates the payroll for a department in an organization. The application should display text that requests the user …

Member Avatar for enfamos
0
121
Member Avatar for MeandJava

Hello everybody, This is my first time on this forum. I started this year with a study, where i learn Java. I'm from the Netherlands, so some names in the classes you may not know. I have a problem with printing out a few arrays of P in the class …

Member Avatar for JamesCherrill
0
436
Member Avatar for NewOrder

what is the function that allows to accept typed input usually i right import java.io.*; but eclipse has got its own function . what is it?

Member Avatar for ~s.o.s~
0
77
Member Avatar for juice33

I have been working on this code for a total of 6 days, I have be trying find ways to implement the user to enter an integer 5 times then reverese those number and determine wheter this is a palindrome or not. Also not the my public static boolean isPalindrome …

Member Avatar for JamesCherrill
0
117
Member Avatar for hgbreton

I am currently playing about with lesson 08 here [url]http://insanitydesign.com/wp/projects/nehe-android-ports/[/url] I would like to change the background colour from black to white. In order to do this at the start of onDrawFrame() I have called [code=java] gl.glClearColor(1.0f, 0.0f, 0.0f, 0.0f); [/code] This does indeed set a white background screen, but …

0
76
Member Avatar for madawa123

Hi guys, I hv the two coordinates of the map. Top left : 37 44 55.49S 144 52 30.73E bottom right: 37 47 54.43S 144 57 59.54E my map is a rectangle with 500width 800height. I want to get the mouse pointer in terms of lat long in degrees and …

Member Avatar for peter_budo
0
4K
Member Avatar for sky_B

I have try to run a program of JApplet as JFrame, but it didn't works. Can someone help me?Thanks.[CODE] public class MyApplet extends JApplet{ //have some coding here class display extends JPanel{ //have some coding here } public static void main(String [] arg){ JFrame frame = new JFrame("MyApplet"); MyApplet applet …

Member Avatar for NormR1
0
158
Member Avatar for NewOrder

i have questions abou the algorithm that i have got here: [CODE] public class BTreeEx3 { public static void main(String[] args) { BTree tree=new BTree(); tree.add(5); tree.add(6); tree.add(1); tree.add(19); tree.add(3); tree.add(10); tree.add(2); tree.print(); } } class BTree{ private Node head; // why is the head private? public void add(int info){ …

Member Avatar for JamesCherrill
0
120
Member Avatar for girlinwayside

I am taking an online java programming class this quarter and the book I have just does not do a good job of explaining anything! The more I read it, the more confused I become! Can someone refer me to an article or site that explains creating methods in terms …

Member Avatar for stultuske
0
2K
Member Avatar for khaled_jawaher

I want to use java to access microsoft sql server express remotely.i have allow remote connection in the database that i have.and i allow port 1433 through firewall. the code is: [CODE] import java.sql.*; import java.lang.*; public class Jdbcconn { public static void main(String[] args) { try { //load the …

0
59
Member Avatar for shivaniaroraji

I was reading a program as follows [CODE]import java.util.StringTokenizer; class Tokentester { public static void main(String[] arguments) { StringTokenizer st1,st2; String quote1="Vdef 3 -1/16"; st1=new StringTokenizer(quote1); System.out.println("Token 1: "+st1.nextToken()); System.out.println("Token 2: "+st1.nextToken()); System.out.println("Token 3: "+st1.nextToken()); String quote2="NGNDFBgh 27/32@3/ewtg@tryh@eretgse"; st2=new StringTokenizer(quote2,"@"); System.out.println("Token 1: "+st2.nextToken()); System.out.println("Token 2: "+st2.nextToken()); System.out.println("Token 3: "+st2.nextToken()); } …

Member Avatar for JamesCherrill
0
146
Member Avatar for raincomeagain

I want to generate random numbers, display them with ten in a row, and count how many are 1s, 2s, 3s, 4s, 5s, and 6s with nested if/else statement. [CODE] import java.util.Random; public static void main(String [] args) { Random generator = new Random( ); int value = 0; int …

Member Avatar for Xufyan
0
140

The End.