36,051 Topics

Member Avatar for
Member Avatar for spartanace

This is my overloaded Jpanel i want to pass the event of the buttons, so that i can change the text in the jLabel in my main class listed below. [CODE]import java.util.Scanner; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class Keypad extends JPanel{ private JButton b1,b2,b3,b4,b5,b6,b7,b8,b9,b10,b11,b12; public Keypad() { setLayout(new …

Member Avatar for javaAddict
0
3K
Member Avatar for SHARKASI

I'VE A PROJECT AND I'M JUST START LEARNING JAVA SO I NEED HELP . HOW SHOULD I START WITH THIS PROJECT ............????? Design and code a Java application to store and manage the rates of some currencies of interest and to perform conversions between them. The application should have a …

Member Avatar for stultuske
0
174
Member Avatar for Memo..~

hi everyone.. I have this assignment that I should sort whatever I enter in ascending order of the variable a .. I want to know what is wrong with this Thank you all in advance.. [CODE]public void addRecord() { Scanner abc=new Scanner(System.in); System.out.println("Enter the file number "); int a=abc.nextInt(); System.out.println("Enter …

Member Avatar for s_sridhar
0
111
Member Avatar for sajithdil

hey guys i want to know is it possible to take a 3ds max 3d model and show it in a java file?? if so could i have some pointers in the right direction?? thanks a lot its much appreciated!!!

Member Avatar for sajithdil
0
269
Member Avatar for mitch9654

My custom button thing isn't clickable. I don't know why! (obviously :P) I DO have an action listener This make a button that looks like a cross. The input is: [code] "name", g, 0, 0, 100, 100 [/code] It looks like this: [url]http://mitch9654.zymichost.com/Java/index.html[/url] [code]package Buttons; import java.awt.*; /** * * …

Member Avatar for mitch9654
0
132
Member Avatar for DeadSoul

Hello friends i have spend a week to make a notepad.But i have one error in it i dont know where i am wrong . i am not able to add JFileChooser in my notepad i have JFileChooser in my code but its not working properly that's why i have …

Member Avatar for leiger
0
164
Member Avatar for memo1

pleas help [CODE]public double getInvoiceAmuont(int q,double pric){ System.out.println("ente the quantity and the peice" ); q=in.nextInt(); pric=in.nextDouble(); if (q<0) return 0; if (pric<0) return 0; return q*pric; }[/CODE] is this answer correct for this question : {{ -Provide a method named getInvoiceAmuont that calculates the invoice amount (i.e., multiplies the quantity …

Member Avatar for leiger
0
78
Member Avatar for b89smith

I have written two different classes that are in two different files one is LoadData.java and the other is csvReader.java both are in the same folder. In the class LoadData I try to use a public function in csvReader by calling csvReader.getData(), when I compile LoadData, which is after I …

Member Avatar for leiger
0
139
Member Avatar for Cerberus

Sorry if this has been asked before. I have a jframe with a textcomponent in it and a menu with an exit option. When you select the exit option a funciton is called that checks whether a change has been made to the document and the user can select to …

Member Avatar for leiger
0
618
Member Avatar for z3r0acidk

Hey all, I need help with this. I have a .txt file, called "littlefile.txt", inside that .txt there is text of course and my java program is supposed to read that text (as a String), and find a word like ... "hello", ... that's ok, but the java program must …

Member Avatar for z3r0acidk
0
152
Member Avatar for ShunT

Hello, a few months ago I started not being able to view javascript. Google ads, chats, javascript popups, chats ect. I use Mozilla firefox but I have the same prob on IE (Yes javascript is enabled on both). I use XP and run Nortions Internet Sec 2005 although I have …

Member Avatar for imnotmyself
0
461
Member Avatar for stevebush

Hi, I am working on assignments that deal with Generics in java. I have a class Movie that have a String name variable. However I have to add a few more properties to Movie objects like Release year and Director name. So I created an Inventory class that uses the …

Member Avatar for JamesCherrill
0
106
Member Avatar for nihao

Hello all: I find that the tag "<error-page>" could not be executed in my struts project. It could not be forwarded to the "error.jsp" when I try to access a not exist page or a wrong url.Why? The web.xml is like this: [code] <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="[URL="http://java.sun.com/xml/ns/j2ee"]http://java.sun.com/xml/ns/j2ee[/URL]" xmlns:xsi="[URL="http://www.w3.org/2001/XMLSchema-instance"]http://www.w3.org/2001/XMLSchema-instance[/URL]" xsi:schemaLocation="[URL="http://java.sun.com/xml/ns/j2ee"]http://java.sun.com/xml/ns/j2ee[/URL] …

Member Avatar for lawrence_o
0
182
Member Avatar for opera

Can I apply JSP and J2ee technology for Social Network developing I am novic in web programming and My thesis title is social networking ! Please reply and advice me how should I do? I have little experiences in J2EE and MySQl looking forward to your reply!! Opera, Mandalay Technological …

Member Avatar for s_sridhar
0
100
Member Avatar for lwschjang

Anybody know of any good tutorials for customizing the appearance of Java GUI's and applets. Specifically, I'd like to design the layout of the GUI or applet in Photoshop. Thank you for your time and help.

Member Avatar for DeadSoul
0
152
Member Avatar for bigmouthmonster

Write a program that asks the user for the name of an input text file. The text file (which could be created with NotePad) will contain integers in character format, one per line, such as follows. 12 1023 -56 84781 0 -9371 The program also asks for the name of …

Member Avatar for jwenting
0
111
Member Avatar for iRemember

I'm trying to create a blackjack program for school. No matter what I've been doing, this keeps coming with errors. My teacher says theres some logic errors, and i don't understand it. [code] import java.util.Scanner; import java.util.Random; public class BlackJack { public static void YesNo(){ Scanner input = new Scanner(System.in); …

Member Avatar for jwenting
0
99
Member Avatar for stephbebalinda

Estoy haciendo un programa en java donde el usuario puede jugar torres de hanoi o resolverlo solo, pero cuando hago q se resuelve solo me tira d una vz la solucion enontonces e intentado cn timers y sleeps para q pare redibuje y asi se mire paso a paso pero …

Member Avatar for stephbebalinda
0
140
Member Avatar for momill06

[CODE]import java.util.Scanner; public class THREE{ public static void main(String args []) { Scanner in = new Scanner( System.in); String symbol; double averagePrice; double stockPrice; int sum = 0; int count = 0; final int FLAG = -999; char options; do { System.out.println("Please chose from one of the following menu options: …

Member Avatar for finito
0
98
Member Avatar for hodna1

Python functions. 1. Given a list of words, return an array which indicates the frequency that each letter occurs. For example, in the list ["apple", "bob"], [ 'a' -> 1, 'b'->2, 'e'->1, 'l'->1, 'o'->, 'p'->2] . The order of the array does not matter and a Frequency class will be …

Member Avatar for jwenting
-1
99
Member Avatar for levraheit

the program asks the user to input the number of users who wants to play. i couldn't get the result of players.length individually. each players result should be number of correct answers from the number of questions asked. please help!. [CODE]import java.text.DecimalFormat; import java.util.Random; import javax.swing.*; public class coll { …

Member Avatar for levraheit
0
105
Member Avatar for tyson.crouch

G'day, I've got rather a simple problem to deal with though i'm personally having some trouble. I've recently fixed up some of my database queries so that i use a view to get the data that i need. My view gets the following info: [LIST] [*]Attraction Name [*]Package ID [*]Package …

Member Avatar for tyson.crouch
0
321
Member Avatar for aleesya88

code [code] import java.awt.*; import javax.swing.*; import java.awt.geom.*; public class QuestionA extends JApplet { public void init() { PanelLukis panel = new PanelLukis(this); getContentPane().add(panel); } } class PanelLukis extends JPanel { private int x_axis, y_axis; private int squareWidth, squareHeight; private int x, y, coordinateX, coordinateY, squareNo; JApplet app; public PanelLukis(JApplet …

Member Avatar for aleesya88
0
154
Member Avatar for Fazle

I am being tasked to record TCP data and play them back with same speed. I am able to record tcp data but struglling to playback with same speed. If someone can help will be greatly appreciated. My codes below are reading TCP data and writing them in minute files …

0
42
Member Avatar for pink_872

Hello everyone, I am trying to build this simple chat program that consist of two classes. One is Server class and the other one is Clint class, but I have this problem with it. It does send and receive strings, but after the the second received string it does stop. …

Member Avatar for s_sridhar
0
170
Member Avatar for haseena04

import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import java.io.*; import java.text.*; import java.util.regex.*; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; class Clustering1 { public static void main(String[] args) throws IOException, FileNotFoundException { int diff_matrix[][] = new int[500][500]; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the data file name\n"); String fname=br.readLine(); …

Member Avatar for javaAddict
-1
160
Member Avatar for haseena04

import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import java.io.*; import java.text.*; import java.util.regex.*; import java.io.FileNotFoundException; import java.io.IOException; import java.io.RandomAccessFile; class Clustering1 { public static void main(String[] args) throws IOException, FileNotFoundException { int diff_matrix[][] = new int[500][500]; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter the data file name\n"); String fname=br.readLine(); …

Member Avatar for javaAddict
0
85
Member Avatar for Abdel_eid

Dear friends i just need a web link or an ebook that contains all java built in functions and classes with it's return types and parameters. thanks in advance

Member Avatar for Abdel_eid
0
88
Member Avatar for staufa

Hi im trying to connect to my database but i dont know why i cant load my jdbc driver: -I've saved the jar file together with the other java files in the same folder called "a" -I used –classpath flag: Windows: "java -classpath .\mysql-connector-java-3.1.8-bin.jar;. LabDB4" but I dont know if …

Member Avatar for peter_budo
0
226
Member Avatar for NPOT

I want to get the size of a folder and also the size of files in that folder but the output is zero even though I used the java **long method** for file size and a for loop to access the files in the folder.The programme only outputs the size …

Member Avatar for masijade
0
132
Member Avatar for bigmouthmonster

Write a program that has only one button in the frame. Clicking on the button cycles through the colors: red --> green --> blue --> gray --> red --> and so on, one color change per click. In addition to the setBackground( Color.color ) method we have been using, you …

Member Avatar for javaAddict
0
95
Member Avatar for chama89

I'm running Eclipse for Java. I created a DOM version of an XML file. Now I want to change an attribute of an element in the file. I called a method that called a method in the class that controls the DOM, and I got a dialog box saying "JDI …

Member Avatar for patrick076
0
1K
Member Avatar for pavank_karanam

Hi, In student project have use 2 combo boxes (state and district) how to write the in jsp code please anybody tell me my mail <EMAIL SNIPPED>

Member Avatar for javaAddict
0
78
Member Avatar for mozten

Ok, so I created a Desktop Application in Netbeans for my class's final project, the thing is I have to present it to my class at my school, but the computers there only have jcreator, how would I get it so that i can compile a netbeans desktop application project …

Member Avatar for javaAddict
0
101
Member Avatar for bebe11bebe

this is my code - i have three classes and i will post all since i have no idea what i'm doing apparently [CODE]public class OneTwoTest { public static void main(String[] args) { System.out.println("Welcome to One-Two Match!"); Game g = new Game(); g.play(); System.out.println("Thank you for playing."); } // end …

Member Avatar for haseena04
1
3K
Member Avatar for beforetheyknew

I dont really know specifically what im searching for, which is why i haven't just found this via searching the web. Have you guys come accross or know of any sort of quiz questions like where it gives you a for loop which isn't in the normal format and then …

Member Avatar for dongbv
0
111
Member Avatar for datuna

hi i have write LSD radix sort but it does not work can anybody help me? here is code public class LSD{ public static int R=1<<8; public static int bytesword=4; public static void radixLSD(int a[],int l,int r){ int aux[]=new int[a.length]; for (int d=bytesword-1;d>=0;d--){ int i, j; int count[]=new int[R]; for …

Member Avatar for jwenting
0
72
Member Avatar for bigmouthmonster

Write the ideal weight calculator so that height in inches is entered by using a slider. Use the approximate formula: W = H2 / 30 , for female W = H2 / 28 , for male where W is the ideal weight in pounds, H is the height in inches …

Member Avatar for jwenting
0
80
Member Avatar for Raakesh399

Hi every one!! I have a java program and i don't know how to delete a record from an array of objects using JOptionPane

Member Avatar for jwenting
0
93
Member Avatar for prem2

Hi , I dont have any basic knowledge in servlet program in java.Now i am using Redhat os. Please any one tell some steps how to execute the servlet program. Thank you, Prem.

Member Avatar for prem2
0
137
Member Avatar for WesFox13

Hello all, I need a bit of help with this program, I need to make my code create a complete binary tree using an array. As well as create a driver class that displays the tree graphically Here is what I have so far with my code Tree Code: [CODE]import …

Member Avatar for WesFox13
0
170
Member Avatar for puppykillaz

I am getting an error message that is quite new to me. I normally can call methods without incident but this time, I saw a new error message. This code is sample coding I am using to see how to fix three of my issues. First Class [CODE] public class …

Member Avatar for puppykillaz
0
315
Member Avatar for albertkao

Pressing the enter key at the jsp page receive extra invalid data at the ProdController.java. The alertgroupStr receive "unack" as expected. However, I do not understand why alertgroupStr receive the extra invalid "null" later. Debug log: 11:14:52,187 DEBUG com.systems.monitoring.war.ProdController:54 - alertgroupStr unack ... 11:14:52,187 DEBUG com.systems.monitoring.war.ProdController:54 - alertgroupStr null ProdController.java: …

0
91
Member Avatar for chrisMed7

Hello i have an assessment to make a car park in GUI and i have tried some stuff but didnt work I need to make in two classes one with the main method and a JFrame container and the other with the buttons for park controls and others Any help …

Member Avatar for JamesCherrill
0
100
Member Avatar for b89smith

I am trying to download an excel file that is avalible on this site: [url]https://www.arcavision.com/Arcavision/index.jsp[/url] Once you are logged a frame opens where you fill out a form and then click submit. On pressing submit the result of the query shows and gives you the option to download the data. …

Member Avatar for Stefano Mtangoo
0
157
Member Avatar for P00dle

Okay, so I'm having problems with my code. I've browsed Daniweb and couldn't find any solutions on here that work. I'm extracting 2 sets of texts from a .xml file. The first part is a directory name(eg. "C:\work\") and the second part is the name of a file in that …

Member Avatar for P00dle
0
4K
Member Avatar for chris evans

Im working on Java app that stores sms and parses this sms. i have them stored in a text file in this form; "21M32113Good19F41324Agree..." i want to parse messages in this form "Age Gender Ans1Ans2Ans3Ans4 Comment" e.g "21 M 32512 Good".i also need to insert new line breaks to separate …

Member Avatar for jwenting
0
48
Member Avatar for Daffodil_Thursday

I am trying to include this piece of code in my Java Class. But the compiler tells me that it can't find Class Calendar. I can't create a class within a class though, can I? Any advice on how I can link this in to the rest of my code? …

Member Avatar for Daffodil_Thursday
0
4K
Member Avatar for sivaprakashm

I need to calculate percentage relative to a particular bar within the series in a barchart Could any one help me out

Member Avatar for jwenting
0
64
Member Avatar for sawant_nitesh

I want to develop a JAVA application which can send and receive SMS. I have a mobile phone connected to PC through USB cable. This JAVA program in PC should be able to send and receive SMS. AT commands are used to instruct mobile phone to send/receive SMS. But how …

Member Avatar for peter_budo
0
503

The End.