35,617 Topics

Member Avatar for
Member Avatar for alleybye

i can trap Number only but i cant trap letter inputs. how to do that? please? example. Enter a letter: 5 "INVALID INPUT! PLEASE ENTER A NUMBER!" please guys?!

Member Avatar for stultuske
0
93
Member Avatar for vasunttfshimoga

Hello, i want to know what's the use of new keyword while Initializaing the array in JAVA.How it's helping in java whether same like new in c++ or malloc in c

Member Avatar for stultuske
0
279
Member Avatar for jorgeflorencio

Hello my friends I have a txt file with the follow layout [QUOTE] error1 255 error2 34 error5 111 error3 23 [/QUOTE] and what i'm trying to achieve is, from this text file plot a trend chart with the errors and respective quantity! this is the code that i'm using.... …

Member Avatar for stultuske
0
2K
Member Avatar for glenak

I've been programming in Java using Java SE, but I want to move on to Java EE. Is this a good idea? I used to think I had to pay to download the Java EE SDK, but that's not the case. So, basically, I'm a bit confused about what Java …

Member Avatar for Dean_Grobler
0
146
Member Avatar for keanoppy

[CODE] int a,b; double temp; int sortTheNumbers = sentenceList.size() - 1; for (a = 0; a < sortTheNumbers; ++a) { for (b = 0; b < sortTheNumbers; ++b) if(score[b] < score[b + 1]) { temp = score[b]; score[b] = score[b + 1]; score[b + 1] = temp; } } [/CODE] …

Member Avatar for keanoppy
0
264
Member Avatar for JoonYup

Hello, I'm trying to write a program for matrix multiplication I keep getting an error.... Please help [code] class Matrix { private int numRows, numColumns; private double x[][]; public Matrix(int m, int n){ numRows = m; numColumns = n; x = new double[numRows][numColumns]; for(int i = 0; i < numRows; …

Member Avatar for masijade
0
104
Member Avatar for panditavinod1

hi i am using a jsp i am having two text fields for entering dates , i am using mysql and i am storing the values of two textboxes in two date fields the format of which is yyyymmdd i want to enter date in ddmmyyyy and change it to …

0
38
Member Avatar for pandeyprashant

Hello everyone, i m trying to take input from jsp page and save this to database. every field is working fine but some problem in date format. its showing some errors. please help me.

Member Avatar for panditavinod1
0
61
Member Avatar for badae

import java.awt.*; import java.awt.event.*; import javax.swing.*; public class MenuDemo extends JApplet { // Text fields for Number 1, Number 2, and Result private JTextField jtfNum1, jtfNum2, jtfResult; // Buttons "Add", "Subtract", "Multiply" and "Divide" private JButton jbtAdd, jbtSub, jbtMul, jbtDiv; // Menu items "Add", "Subtract", "Multiply", "Divide" and "Close" private …

Member Avatar for badae
0
191
Member Avatar for star_lavender

hi..I am really new in Java software development..I am trying to make sure that the JXTable will refresh or update the data after the save button is clicked which means that the JXTable will display the lastest data that retrieved from the database..as what I had googled through the methods …

Member Avatar for Ezzaral
0
246
Member Avatar for lilsmurf

When I try to run what I have so far in my program, I get an error when I enter in the date as 11/11/2010 that states "Exception in thread "main" java.util.InputMismatchException". Why am I getting this and how do I fix it? Also, I have some comments in the …

Member Avatar for NormR1
0
743
Member Avatar for TGeorge824

I can't believe I'm asking this, but this assignment I was given is proving very difficult. I was asked to find the ECLOSE function of a given Epsilon non-deterministic finite automata. All it is is the BFS tree of a graph from a given point, provided that the vertices are …

Member Avatar for TGeorge824
0
146
Member Avatar for jamesonh20

So even though this is a simple project, I found a lack of good code on the web under this topic for multi lined strings. I thought I would share it with everyone. Hope it helps you! Prints file foward first, then in reverse (and yes there are many different …

Member Avatar for jasimp
0
174
Member Avatar for dragonshadow001

Hello, I'm really new to doing Java only been doing it about 2 month so really a novice. I'm currently attempting to make my first app that is not a school project. I want to embed the current time in my application that is pulled from the local system. It …

Member Avatar for Ezzaral
0
331
Member Avatar for pgset

i need to make a tree canopy in the shape of a pyramid drawn using nested loops the tree should look like this [url]http://cs.nmu.edu/~rappleto/Classes/CS120/Assignments/beach-assignment.html[/url] i have the trunk but i cant figure out the tree top to save my life. any ideas on where to start? thank you to all …

Member Avatar for NormR1
0
32
Member Avatar for fredw300

Hi, I am developing a web application using JSP/Servlet. I have a form in .jsp to upload excel file which is then processed (by servlet) and an excel ouput is generated. I need to validate input file to see if a certain cell in the workbook has some value as …

0
77
Member Avatar for shandow

Hi, I'm trying to make my own sokoban game in java. Sokoban is a top down 2D puzzle game where you move around a level trying to push boxes to the goal area in the least possible moves. I'm already pretty stuck at an early stage. My first objective it …

Member Avatar for adams161
0
419
Member Avatar for pgset

i just need a method that will draw me a flower but it says illegal start of expression error on line 36. what does that mean and how do i fix it? import java.applet.Applet; import java.awt.*; public class ProjectTwo extends Applet { public void paint(Graphics g) { ///background g.setColor(Color.blue); g.fillRect(0,0,1366,384); …

Member Avatar for adams161
0
148
Member Avatar for justsimplenick

I'm just starting out in java, and I am totally stumped on this assignment. I have to make a program where the user selects a single character and then a file. The program is then supposed to check each character in the file, and output how many times that character …

Member Avatar for NormR1
0
91
Member Avatar for alleybye

i cant sort it descending? why? please help me!! [code] import java.io.*; import java.util.Arrays; import java.util.Collections; public class alpha { public static void main(String args[]) throws IOException { BufferedReader br = new BufferedReader (new InputStreamReader(System.in)); int num = 0,c,x,a = 0,d,e,letter1,f; String input; System.out.println("\t[WELCOME]"); for (d = 0;d<=2;d++) { System.out.print("How …

Member Avatar for adams161
0
63
Member Avatar for shahreza

i got a question about random number.. this is my sample data : jenny jason jerry peter chriss wayne ralf andre alexis alex garcia lorris ronny lyn armand i wanna pick name above to put in free slot like below.. 1.. 2.. 3.. 4.. 5.. 6.. 7.. - - - …

Member Avatar for NormR1
0
109
Member Avatar for kezkez

Question is below for the TestSlotMachine. SlotMachine class... [CODE] import java.util.Random; import java.text.NumberFormat; public class SlotMachine { enum CoinSlot { penny, nickel, dime, quarter; } //private String typeOfMachine; public double balance; SlotMachine() { // typeOfMachine = machineType; balance = 0.0; } public double deposit(double amount) { balance = balance + …

Member Avatar for kezkez
0
161
Member Avatar for DeadSoul

i have made this code which displays all the values in JTable can any one help me out how to get report of those data.this code is just the module of my library project .Now i want to generate a report for it . [CODE] import java.awt.*; import java.awt.event.*; import …

Member Avatar for Ezzaral
0
100
Member Avatar for merban

I'm a newbie to JAVA and programming as a whole. I'm trying to write a basic code to declare , which holds a variable named minutes on a job, and assign a value. It should display the value in hours and minutes. An example would be, 197 minutes becomes 3 …

Member Avatar for NormR1
0
145
Member Avatar for Khodz

So i'm trying to make a module for my program that returns a multidimensional array based on another array in the form of a command-line argument. Here is the module that's keeping me up at night: [CODE]public static double[][][] getDimensions(String [] args) { final int l = args.length; double dimensions …

Member Avatar for Khodz
0
169
Member Avatar for DanHu

ok so i have 3 separate classes: Product, Action, and Invoice. Action would be my interface that allows me to add and remove items in my hashmap that is in my Invoice class. my Product class would have the instance variables name, info, id and quantity (correct me if I'm …

Member Avatar for NormR1
0
512
Member Avatar for yog2mis

Hi All I want to develope a jsp page which skip Jasper server login page and forward at jasper home page without login. i also dont want to sho my URL in brouser. both Jasper and my jsp contain in apache webapps folder.i did it by [CODE]<jsp:forward page="/jasperserver/login.html"> <jsp:param name="j_username" …

0
51
Member Avatar for sheiyvin
Member Avatar for 47pirates

For my school project , I got student details in database and according to system of that school yearly the student standards are raised by one grade . So how can i code so that the data i've entered in database, say 4 grade this year will become 5 grade …

Member Avatar for 47pirates
0
124
Member Avatar for SC803

public class kgPoundsConverter extends JApplet 12 { 13 private JPanel kPanel; // To hold a text field 14 private JPanel pPanel; // To hold a text field 15 private JPanel buttonPanel; // To hold a button 16 private JTextField kgram; // kilogram 17 private JTextField pounds; // pounds

Member Avatar for Nick Evan
0
85

The End.