32,199 Topics

Member Avatar for
Member Avatar for Fulladder

I am designing a bank system Soon as the user opens the display the welcome message alone with all the latest offers are displayed without any input. afterwards the user is given 4 set of instructions for example: enter 1, 2, 3 or 4 to display the 1. Display balance …

Member Avatar for Fulladder
0
89
Member Avatar for whimsical1987

Hi experts, I have a question on generating a hashtable which contains only unique numbers. Can anyone help me out. My code is here. I want to check if the key and value are in the hashtable or not. if they are in the hashtable i break to start generate …

Member Avatar for JamesCherrill
0
86
Member Avatar for IOwnAndPwnU

[B]So basically, my JMenuBar has to appear everywhere in my applet (I have CardLayout, 3 cards/screens), in every screen and in the same location (looks nice, consistency). How would I go about doing this?[/B] So, I was making a menu for my applet. I followed the exact instructions at: [url]http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html[/url] …

Member Avatar for BestJewSinceJC
0
233
Member Avatar for SwapnilDD

Hi.. I am trying to connect to my database (MySQL) within a JSP page. The is compiling without any error, but still I am not getting any output. Can anybody help?? The code is as follows: [CODE] <%@page contentType="text/html" pageEncoding="windows-1252"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head><title>Enter …

Member Avatar for SwapnilDD
0
2K
Member Avatar for KatWoman27

This is what I need help with: "Write an application to simulate the rolling of two standard six-sided dice. The application should use an object from the class Random to roll the first die and then again to roll the second. Each die can have the values of 1 to …

Member Avatar for javaAddict
-1
375
Member Avatar for ihong154

This is my assignment Starting with last week's Property project, build an array of Properties in your main(). Add static methods to the Property class: void ArraySort(Property[] property_list, String key_field) This will sort the array, property_list, based on the argument, key_field, passed in. These are the legal choices for key_field: …

Member Avatar for javaAddict
0
146
Member Avatar for JAK3CAL

Ok so I'm doing some practice questions, and this one is trippin me up a bit. I need to create an array that stores data 0.0, 0.1, 0.2, 0.3, all the way to 20.0. Then I have to compute the sums of the elements that are not integers (i.e 0.0, …

Member Avatar for javaAddict
0
109
Member Avatar for laveena

how can i make my java application dynamic so that if any user rename the folder- Download,Music,Documents of Filesystem automatically reflects changes to my application

Member Avatar for peter_budo
0
51
Member Avatar for laveena

i want my java application to access windows drive and pen drive. how can i mount drives in linux root using java. so that it will be easy to access files #mount -U34D5-FCF7 /mnt/c: is a linux commnad i want this to be executed by my java application

Member Avatar for peter_budo
0
57
Member Avatar for Ashwin1985

Any suggestions / code examples for Encryption/Decryption of files(any file format) in java. command line args -

Member Avatar for peter_budo
0
475
Member Avatar for IOwnAndPwnU

Hi. I am coding a game for my basic Java programming course, and I am currently coding a game (Othello, aka Reversi). I am having issues with the JButton size. [CODE]public void game () { resize (800, 680); game = new Panel (); Panel board = new Panel (new GridLayout …

Member Avatar for JamesCherrill
0
2K
Member Avatar for pateldeep454

I want to put everything into one applet. How do I do that? Please HELP :( [CODE] import java.applet.Applet; import java.awt.*; import javax.swing.JOptionPane; public class HelloWorld extends Applet { public void paint (Graphics g) { g.drawString ("Name" , 50, 25); String first; first = JOptionPane.showInputDialog (null, "Enter first number: "); …

0
52
Member Avatar for IOwnAndPwnU

[B]How would I implement two listeners?[/B] I need to implement ActionListener and [URL="http://java.sun.com/docs/books/tutorial/uiswing/events/mouselistener.html"]MouseListener[/URL]: I have the [CODE]public class Othello extends Applet implements ActionListener[/CODE] which is just below my libraries. But I also want to be able to use the MouseListener. So, I'm having trouble implementing both listeners. I tried: [CODE] …

Member Avatar for moutanna
0
131
Member Avatar for stain3d

Hey guys. I wanted to know if someone can tell me what's wrong with my code. I got it to work, to a point. It shows all the months, however, when a user inputs the month/number it ends. Which it needs to playback the month... Example: 2 = March Here's …

Member Avatar for moutanna
0
3K
Member Avatar for CoderDude123

Hi there, I am making (more like, have already made) an IRC bot in Java. I would like to be able to query a shoutcast server with my bot and return basic information (such as now playing, bitrate, etc). I have scoured google and only found php code which i …

0
72
Member Avatar for KatWoman27

I got an assignment, and this are the instructions: "Design and implement a Nim class and a NimGame application to allow two human players to play the game of Nim. The game starts with three piles of stones. The first pile has 3 stones, the second pile has 5 stones, …

0
54
Member Avatar for InsaneOstrich

I have to write a JUnit test method for a short program that lets the user add/remove/browse images in a collection. (Adding an image is done with a JFileChooser) The test method that I wrote exhibits some really bizarre behavior; it passes every so often, but fails most of the …

Member Avatar for InsaneOstrich
0
548
Member Avatar for spaniel

Hi, I'm trying to develop a linkchecker, the HTML text I'm using it on though has a few lines such as this: [CODE] <li><a href="PhD/refs.html"> <b> References </b> </a> section of PhD <li><a href="WWM/refs.html"> <b> References </b> </a> section of WWM proposal[/CODE] which aren't being picked up by my linkchecker. …

Member Avatar for moutanna
0
105
Member Avatar for handsomedan

I am having a couple of problems with my code. First, whenever I try to remove the JOptionPane from line 79 in my code, I get a NullPointerException from the line this.dbGraphics = this.dbImage.getGraphics(); a couple of lines down from the JOptionPane. Does anyone know why? Another problems is that …

0
20
Member Avatar for callie

Hey. I need a method that creates a matrix from an array, for instance: ({10, 11, 12, 13}, 2) should return {{10, 11, 12}, {13}}. [code]public class Matrix{ public static int[][]toM(int[] array, int a){ int[][]matrix = new int [(array.length)/a][a]; for (int i = 0; i < array.length; i++){ int value …

0
65
Member Avatar for noplagiarism

I have to make an audio player in java applet so that it can be used on websites. It will browse files on the computer, make its playlist and will play them one by one. I have compiled the .jar file and done everything correctly in the <applet> tag in …

Member Avatar for noplagiarism
0
180
Member Avatar for sweetgurl

i have no idea to return multiple statement. [code] public double[] compute(double[] times) { double[] t = this.Portion(times); double aa = this.computeTime(180-19.5,t[0]); double bb = this.computeMidDay(t[1]); double cc= this.computeAs(1 + asrJuristic, t[2]); double dd = this.computeTime(0, t[3]); }[/code] how to return all double " aa, bb, cc, dd" in this …

Member Avatar for sweetgurl
0
83
Member Avatar for mahdi68

hi i download eclipse 3.5.1 how can i install tools for j2me programming on it ??? thanks

Member Avatar for peter_budo
0
82
Member Avatar for field442

I'm doing my first year project at uni and have hit a stumbling block. I have to make a basic version of a media player that will allow a user to add tracks that are stored in a MS Access database to a playlist, and give them a rating. My …

0
61
Member Avatar for iZander

I've been having problems with my form program while trying to call data entered into a text field and displaying in a GUI after pressing a button. Here's my code. [CODE]import java.awt.*; import java.awt.event.*; public class ProjectForm { public static void main(String[] args) { Frame frm=new Frame("Personal Information Form"); frm.setSize(350,200); …

Member Avatar for javaAddict
0
91
Member Avatar for Jeun

/*None of the buttons except create and clear work can someone help please , can anyone help me with the parts i have missing , the account and date test class work fine i just need the bank account GUI to work properly , here is a detailed explanation of …

0
151
Member Avatar for extemer

i got a problem wana display my String but it doesnt work here is my code i dont understand why it doesnt print me anything..... [code]class StringDemo { public static void main(String[] args) { String s1,s2,s3,output; s1=new String("hello"); s2=new String("hello guys"); s3=new String("happy birthday"); output="s1 = " +s1+ "\ns2 = …

Member Avatar for extemer
0
108
Member Avatar for ppllmmnn

[CODE]import java.io.*; import java.util.*; public class UMUC { public static void main(String[] args) throws Exception { String s1 = "input.txt"; String s2 = "output.txt"; try { FileReader fr = new FileReader(s1); BufferedReader br = new BufferedReader(fr); String lineRead = br.readLine(); while(lineRead != null){ s2 = s2 + "\n" + lineRead; …

0
34
Member Avatar for bondgirl21

Hi, I am having problems counting the number of words in a text file that i created (it has 130) and printing that finding (number) into another text file (output)....Any help is welcomed. I have this, but it doesn't print anything out yet...am stuck. [CODE]import java.io.*; public class FileIO{ public …

Member Avatar for bondgirl21
0
181
Member Avatar for wrongo

I have 2 objects called X and Y created from a class called Product which has a field called numInStock. From another driver program, I want a user to input either X or Y with their response being stored in a string userchoice (so user enters X or Y as …

Member Avatar for IsharaComix
0
91

The End.