32,199 Topics

Member Avatar for
Member Avatar for o0oKodako0o

I have a problem about loading/saving ArrayList from/to file. I've searched some thread about this but it's not ok, because the demo used ArrayList<String> but i used ArrayList<Student> with Class Student [ICODE]public class Student { private String id; private String name; private int year; private String genre; private String course; …

Member Avatar for Buffalo101
0
168
Member Avatar for jems5

My attempt to write a recursive method to produce the results of the number of combination where x=13 and y=52 and Combination (y, x) =..... When I use small numbers (e.g.: 2,4) I tend to get a result only when I blank out the 3rd if statement. The formula used …

Member Avatar for JamesCherrill
0
143
Member Avatar for yap_1991

Hi all, I've created a GUI layout for what I am supposed to do. I have 2 combo boxes in the GUI and both serves the same function. The both of them needs to be able to drop-down the list of files from one of my folders. Hence, I just …

Member Avatar for masijade
0
1K
Member Avatar for Krimi

i was wondering if its possible to change the look of the buttons? [url]http://peecee.dk/index.php?id=80239&noresize=yes[/url] the left one is how it looks in Netbeans and the right one is how it looks when i run it. i dont like the one to the right :/ is there any way to change …

Member Avatar for masijade
0
169
Member Avatar for kvkc

Hi i have a requirement to read a text file where field positions are specified and make use of that data to insert into tables. Please refer to the data in the text file below 1234 HEDEPT 12-3-2009 12-03-2009 yesno yes A [email]hello@hello.com[/email] 12 y12 1234 HEDEPT 12-3-2009 12-03-2009 yesno …

Member Avatar for javaAddict
0
205
Member Avatar for 080346

hello everybody; i want to know that how i will open another gui when i click on a button?? thnx

Member Avatar for javaAddict
0
4K
Member Avatar for Buffalo101

Hello, I want to use a JTable for displaying data loaded from a .txt file. The problem is that I don't see any methods for inserting a row. The code NetBeans generates is this: [code=java] jScrollPane1 = new javax.swing.JScrollPane(); tabel = new javax.swing.JTable(); label1 = new javax.swing.JLabel(); jButton1 = new …

Member Avatar for Buffalo101
0
2K
Member Avatar for sonakrish

Hi there.. In sleep(5000) what type of data is 5000??? Is that an integer or byte or something. Thanks in advance

Member Avatar for masijade
0
121
Member Avatar for TheWhite

[code] public class TEST extends JFrame{ ... blah, blah..... private void launch(){ setBounds(200, 200, 100, 100); setDefaultCloseOperation(EXIT_ON_CLOSE); JPanel greenPanel = new JPanel(); greenPanel.setSize(70, 70); //<---- xNot resize the greenPanel greenPanel.setBackground(Color.green); JPanel yellowPanel = new JPanel(); yellowPanel.setSize(50, 50); //<-- xNot resize yellowPanel in greenPanel yellowPanel.setBackground(Color.yellow); greenPanel.add(yellowPanel); JPanel bluePanel = new JPanel(); …

Member Avatar for Azeerazly
0
198
Member Avatar for louiscos77

Hi guys; Just like I said in the <title>, How can I install JBullet in Netbeans? Do I need to write the Monotone commands? 1:0 case:1 then how do I get the mtn commands, is just because it shows this output<< "mtn" is not recognized as an internal or external …

Member Avatar for SgtMe
0
140
Member Avatar for Pandamonium

Hi I am trying to write a program that asks the user for a 2 digit number and then takes that number and prints out its english name. ex: 45 Forty - Five The problem I am having at the moment is that I cant figure out how to seperate …

Member Avatar for griswolf
0
110
Member Avatar for azzman

This is what I have so far. This is a two player game. I need to make it a one player game (player vs. computer). I am also trying to make the computer smart.. for example, if there is an open corner, then it should take that spot. Basically, the …

Member Avatar for griswolf
0
443
Member Avatar for jdiddy

i have used the XMLEncoder to put my list of clients details into but am wondering how i go about retrieving information from the xml files say for instance if i wanted to show all clients who were entered on a specific date? so far i have. public void dxml(){ …

Member Avatar for ~s.o.s~
0
110
Member Avatar for Slobodino

There's this rectangular polygon (all angles are 90* or 270*) which happpens to be convex as well and this rectangular polyline which intersects the polygon on two occasions. The polyline thus splits the polygon into two new rectangular polygons. Is there an easy way to obtains these two polygons in …

Member Avatar for Taywin
0
102
Member Avatar for bluejamesbond

Hello, I am trying to get an image and place a rectangle on top of it as an overlay. So, the image has a different hue as well. Something like this: [URL="http://img215.imageshack.us/img215/8482/picpmf.png"]http://img215.imageshack.us/img215/8482/picpmf.png[/URL] For the overlay: I am currently using this override method on JLabel. It doesnt look that good [CODE]public …

0
55
Member Avatar for wowz

[CODE]/** Generates the n'th Fibonacci number */ import java.util.* ; public class FibonacciGeneratorTester { public static void main(String[] args) { System.out.println("The 1st Fibonacci number is: " + getFibonacci(1)) ; System.out.println("Expected: 1") ; System.out.println("The 3rd Fibonacci number is: " + getFibonacci(3)) ; System.out.println("Expected: 2") ; System.out.println("The 5th Fibonacci number is: " …

Member Avatar for kramerd
0
175
Member Avatar for sciprog1

Hello Members, I have three balls(all JPanels) bouncing in a JFrame. Following are the files: BouncingBalls.java: [CODE]import javax.swing.*; import java.awt.*; class BouncingBalls extends JFrame { public BouncingBalls() { setResizable(false); setSize(400,400); Ball ball1 = new Ball(); Ball ball2 = new Ball(); Ball ball3 = new Ball(); ball1.add(ball2); ball2.add(ball3); getContentPane().add(ball1); setVisible(true); Thread …

Member Avatar for sciprog1
0
2K
Member Avatar for ITmajor

hi everybody,,, please i need your help in my project if you don't mind my project is to create an array with size of 10 that allow you to inter 10 students, their id number and thier marks and show the average of the marks as a,b,c,d,and f thats it,,, …

Member Avatar for peter_budo
-2
135
Member Avatar for Kerrai

Greetings So i'm trying to figure out how regex works and already run into a roadblock. I figured out the easier ones, if a string only consists of numbers or letters. But these required a little more thought it seems. These are three random linen that i need to check …

Member Avatar for Taywin
0
129
Member Avatar for ZozOQ

Hello i am new here, i want to ask about a problem of mine. I have made a server code, so i can send commands from other program C# i made that but my problem is when i start the java program because is Loading. The Server is starting at …

Member Avatar for kramerd
0
188
Member Avatar for wowz

[CODE] import java.util.* ; public class CurrencyConverterTester { public static void main(String[] args) { Scanner scanner = new Scanner(System.in) ; System.out.println("How many euros is one dollar?") ; String input = scanner.nextLine() ; double rate = Double.parseDouble(input) ; CurrencyConverter converter = new CurrencyConverter(rate); boolean done = false; while (!done) { System.out.println("Dollar …

Member Avatar for wowz
0
176
Member Avatar for soccer13

Hey guys, I got such great help last time I decided to come back for more :). Hope I'm not bothering with these questions, my teacher isn't much for being nice or explaining.. Right now we are getting into methods, I know that they aren't that difficult but I for …

Member Avatar for peter_budo
0
78
Member Avatar for adaniel058

I can not figure out why my code is reading in data to my vector in funny ways. I have added the input file and necesary class to test. It seems to be skipping values in the input file and also adding things to seperate places in the vector instead …

Member Avatar for kramerd
0
231
Member Avatar for manonfire89

Hey guys i have been told to do this Bank account program as you can see the description below, what i have so far is a program that i can create the bank accounts and delete them within the Frame, what i cant get working is the withdrawing the balance …

Member Avatar for Taywin
0
217
Member Avatar for opeomotayo
Member Avatar for peter_budo
0
32
Member Avatar for purijatin

I am facing this problem where one thread keeps adding packets which it receives from the network to linkedlist. And the other thread retrieves it from the linked list. The below is the code of the Thread which keeps receiving the packets and add's them to list. [CODE] private class …

Member Avatar for JamesCherrill
0
90
Member Avatar for homeryansta

I created a piece of code that simulates a pendulum with the gravity(assuming no friction or resistance). However, it is not as smooth as I want it to be. So.. does anyone know what I can do to make it smoother? [CODE=java] import java.awt.*; import java.awt.event.*; import java.lang.Math; import java.lang.Runnable; …

Member Avatar for Eric Cute
0
282
Member Avatar for Checkerboz

Hi, I'm reading this book about Java right now and in it was this example so I wrote it off and tested it... I get the error "Exception in thread "main" java.lang.NoSuchMethodError: main" and from what I've understood it's because I am missing a main class... Here's the deal though: …

Member Avatar for Dhruv Gairola
0
164
Member Avatar for haxtor21

Hello Daniweb. I am trying to make an application for a ATM machine (class homework). This is the schematic that I followed [url]http://www.screencast.com/users/haxtor21/folders/Jing/media/303e583a-8f90-46f3-8ed1-a35dde2200bb[/url] My issue is that I'm trying to access a text file and search for a account ID. After the account ID i am doing a nextDouble and …

Member Avatar for haxtor21
0
176
Member Avatar for blurX

I'm doing a phone number conversion program. I created a method to convert the letter to numbers, and a method to format the phone number(dashes after 3 and 6 numbers). Both methods return a value. I don't want to post the entire program, but the calling method in the main …

Member Avatar for group256
0
106

The End.