32,199 Topics

Member Avatar for
Member Avatar for javaAddict

This is not much of a question, but a discussion and searching for opinions. I have seen that many use the Scanner class for getting input from the keyboard. Some, like myself, use the BufferedReader. Why will someone use one over the other? Or they both do the same thing …

Member Avatar for StephNicolaou
0
537
Member Avatar for iamcreasy

I am trying to print my stack trace on a file. So far I am successful. But, when I try to create the log file name using current time and date, the main program throws exception in the Output(NetBeans) window instead allowing my code to handle it. I am using …

Member Avatar for JamesCherrill
0
161
Member Avatar for gunjannigam

Can anyone suggest a open source llibrary for plotting 3D graphs . More precisely dynamic graphs. I was using jfreechart but that is only for 2D plots. I need a library so that I can plot 3D graphs.............

Member Avatar for AppB
0
141
Member Avatar for Jessurider

how to convert [B]\[/B] to [B]/[/B] in strings using java String path="C:\Documents and Settings\user\My Documents\Crypt.avi"; Eventhough [B]path.replaceAll("\","/");[/B] does'nt works!!!!! can anyone tell me how to do this?

Member Avatar for Slimmy
0
69
Member Avatar for anthasuresha

Is there any framework or sample java code to evaluate an arithmatic / logical / bitwise expression , which will provide the value for input parameters , to make the condition pass. For example , In the below sample arithmatic condition , if the values a=7 and b=6 are passed …

Member Avatar for anthasuresha
0
231
Member Avatar for aldeene

can someone redirect me where I could learn serial port programming in java thanks.

0
80
Member Avatar for coolsport04

Hello. I am trying to get back into Java and wanted to start by trying to make a functioning GUI calculator. I have the basic framework for it, but I am having some trouble with the operator. I would like to take what is on the textfield and put that …

Member Avatar for coolsport04
0
920
Member Avatar for 1Nbl00m

Hi Guys, Firstly, i'd like to state that this is a homework question which means i'm not looking for a direct solution to my problem. Just subtle hints on how to improve etc. I'm posting this here as I want to try and get a better understanding of Java's wait() …

0
246
Member Avatar for nofanman4311

I need some help with this. For my class I have to make a game called hexo, basically "Hexo is a game loosely based on the television game show Lingo. Rather than trying to guess 5 letter words (as in Lingo) the Hexo player will have sixteen tries to guess …

Member Avatar for CSloan7597
0
153
Member Avatar for ali11

Hi i am looking for following output.I am not getting these. System.out.println(total no of grades) Number of A's Number of B Numbers of C Number of D number of F [CODE]import java.util.Scanner; public class ExamScores { public static void main (String[]args) { String a; int count= 0; String word; int …

Member Avatar for ali11
1
5K
Member Avatar for DK58

Ok so i am writing a program to determine a users hat,jacket, and waist size. I have most of it done but i am still getting an error. Any help would be appreciated! [CODE]import java.util.*; public class Sizes1 { public static void main(String[] args) { int answer = 0; int …

Member Avatar for hfx642
0
156
Member Avatar for matharoo

What is the best approach we can follow while trying to solve a cipher text without a key? I searched over web but was unable to find some good method.... Plz help guys...

Member Avatar for hfx642
0
214
Member Avatar for lele07060

So I did the first part of my assisgnment like this * ** *** **** ***** ****** ******* ******** ********* using this code [CODE]public class starForTest { public static void main(String [] args) { for (int i=1; i<=9; i++) { System.out.println(); for (int j=9; j>=i; j--) { System.out.print(" "); } …

Member Avatar for NormR1
0
153
Member Avatar for daneaum

[B]I have created a static Main class called ProductButtonTestDriver, that will run my class ProductButton.java- the prof wants a picture of each coffee shop item, with the name and price to appear in a button, then a check box if the customer selects that item- I am only on the …

Member Avatar for daneaum
0
1K
Member Avatar for lele07060

Can someone tell me how to fix this please? [CODE]public class NestedNumber { public static void main(String[] args) { for (int i=1; i<=5; i++) { System.out.println(); for (int j=1; j<=i; j++) { System.out.print(j); } } System.out.println(); } } [/CODE]

Member Avatar for Ezzaral
0
183
Member Avatar for shady05

[code]//This is the coding that I have done in delete item private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here int selectedIndex = jList1.getSelectedIndex(); jList1.remove(selectedIndex); }[/code] its throwing following Exception [code=text]xception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 1 at java.awt.Container.remove(Container.java:1132) at musicplayer.jButton2ActionPerformed(musicplayer.java:144) at musicplayer.access$100(musicplayer.java:23) …

Member Avatar for JamesCherrill
0
3K
Member Avatar for SnarkysXe

The error is: class, interface, or enum expected. I've never seen or heard of this error before surprisingly, and I've written all of my code the same way, so I'm not too sure what's wrong with. I've put red arrows around the lines in question. Thanks in advance! [CODE]/* Hangman …

Member Avatar for NormR1
0
249
Member Avatar for Pravinrasal

[B]can anyone help me to draw clock cycle in java using swing when i give 5 clock then it will show me 5 clock cycles[/B]

Member Avatar for JamesCherrill
0
215
Member Avatar for vinod_javas

Hi guys... Is it possible to stop opening multiple instance of a jar file... I just want to open my application only one (only one instance) at a time.

Member Avatar for peter_budo
0
6K
Member Avatar for JessHill19

Write a Java program to demonstrate the use of inheritance, polymorphism, interfaces and transaction processing. This program will also use the Vector class. Class Definitions: You are to begin with the following class (Account.java): *bottom of post* [CODE] public class Account implements AccountAction { protected String accountNo, institution, name; protected …

Member Avatar for peter_budo
0
1K
Member Avatar for TigerTeck

Directions...Write a program SumOfOdds that has one main method that asks the user to input two odd integers where the first is smaller than the second. The program ouputs the sum of all the odd integers from the smaller output to the larger output. You must use a while loop …

Member Avatar for leodash
-1
162
Member Avatar for iamcreasy

What does the $ means, EventQueue$1.class(Red marked) Attached picture [URL="http://i39.photobucket.com/albums/e179/iamcreasy/Untitled-6.jpg"]http://i39.photobucket.com/albums/e179/iamcreasy/Untitled-6.jpg[/URL] I am using NetBeans.

Member Avatar for iamcreasy
0
200
Member Avatar for adarshcu

Hi All, I need to have a Regex that will not allow just spaces, but it can allow sentences with spaces. It should allow any special characters that occur as well. Actually, it is for a text area of comments. So i want to restrict him from entering just spaces. …

Member Avatar for adarshcu
0
110
Member Avatar for Nandomo

I am making a Gui for an inventory. And I want for each time a person presses my next button, the jLabels to display the next item in the arrayList. Right now I'm stuck as it only displays the last element, Any help please? [CODE] // action on the button …

Member Avatar for Nandomo
0
146
Member Avatar for dsoto

import java.util.Scanner; public class Student { private String FirstName; private String LastName; private String Address; private String PhoneNumber; private int Credits; private double Tuition; double Health_Care; double Late_Fee; double Meal_Plan; double TotalTuition; double IncidentalFee; private boolean state; private boolean LateFee; private boolean CampusFood; private boolean HealthCare; public Student() { } …

Member Avatar for leodash
0
4K
Member Avatar for Ruben1123

[CODE]public class Order { private int widgets; private double price; public Order(double undiscountedUnitPrice) { price = undiscountedUnitPrice; widgets = 0; } public void addWidgets(int quantity) { widgets = widgets+quantity; } public double getTotalPrice() { return price*widgets; } public double getUnitDiscount() { if(widgets>10000) { if((widgets-10000)/1000>47.5) double toTakeOff = (((widgets-10000)/1000)*.10); price = …

Member Avatar for Aviras
0
162
Member Avatar for TigerTeck

Directions...Write a program SumOfOdds that has one main method that asks the user to input two odd integers where the first is smaller than the second. The program ouputs the sum of all the odd integers from the smaller output to the larger output. You must use a while loop …

Member Avatar for TigerTeck
0
167
Member Avatar for dennysimon

hello all I have one textField and one textArea. How to move the cursor to the end of Text of TextArea when -cursor is in textField,and keyboard [Enter] pressed thank you denny

Member Avatar for dennysimon
0
186
Member Avatar for ali11

can someone help me to fix my codes.I am receving some errors.This is my first time i am using stack in GUI. [CODE]import java.util.Stack; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.*; import java.util.Scanner; public class CalcGUIPanel extends JPanel { //=============================================== instance variables //--\- Component referenced during execution private JTextField …

Member Avatar for NormR1
-1
217
Member Avatar for Jessurider

can anyone tell me how to make appear a jframe in a slow motion in java i'm using netbeans editor..............

Member Avatar for NormR1
0
412

The End.