31,001 Topics

Member Avatar for
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
168
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
120
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 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
109
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
442
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
109
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
54
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
134
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
128
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
186
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
77
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
228
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
216
Member Avatar for opeomotayo
Member Avatar for peter_budo
0
31
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
89
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
209
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
155
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
160
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
105
Member Avatar for gedas

hey everyone, i have few text files that contain some data. what i need is to be able to display those file names in JTextArea and if the number of text files increase/decrease i would want the file names automatically change in the JTextField(after next compilation). i would be very …

Member Avatar for Eric Cute
0
47
Member Avatar for computercoder

I am writing a program that is supposed to count the number of vowels in an inputted (by the user) body of text. [CODE] import java.util.*; public class Vowels{ public static void main(String[] args){ Scanner console = new Scanner(System.in); int counter= 0; System.out.println("\nInput a sequence of characters"); String text = …

Member Avatar for Eric Cute
0
103
Member Avatar for ssubnel

I could not get this past my editor, and am not bright enough to understand why. My TA and I do not share a common language fluency and I do not understand remotely what he is saying. Can anyone tell me why this doesn't run? [CODE]import java.util.Scanner; public class sumMatrix1 …

Member Avatar for ssubnel
0
93
Member Avatar for TankMontna

Hi, I need a little help, i found out to repeat an action/animation automatically I need to use a timer but im having troubles implementing it into my script. This is the last few part of the action... public void slowMoveVertical () { sun.slowMoveVertical(-100); } Now I what I want …

Member Avatar for Ezzaral
0
175

The End.