32,206 Topics
| |
I'm trying to see if someone can help me with two issues with my program. It compiles fine without errors, but some of my numbers in my amortization table only gives me one number after the decimal place and others give me two numbers. I was wondering if something in … | |
i need to get the output of 1 2 4 7 11 16 22 i know im on the right track however i cant figure out a way to get the outputs in the right form like 1+2+3 etc like its doing in the output i should get. i know … | |
How can i right shift a binary number and display all of the positions in java ? | |
Write a Java program to continue creating your own userdefined methods and introduce some do while loops. Write two valuereturning methods called farToCel() and celToFar(). These two methods will convert temperatures from Fahrenheit to Celsius and Celsius to Fahrenheit respectively. They will each take a single int parameter and return … | |
Hi! Could someone please help me to solve one more problem. To read the data (ArrayList) from file, I'm using the following code, which assumes that columns are separated with ",". It works perfectly: [CODE] public static List<UserDataRow> readData() { List<UserDataRow> listofusers = new ArrayList<UserDataRow>(); FileInputStream fstream = null; try … | |
I know this probably doesn't make any sense, but I'm going to try. I have a GUI I created for a checkbook balancing program. And I have an account class with a few extended classes (savingsAccount, checkingAccount, etc). I want to use the GUI I created with the account classes … | |
program test whether the given integer is perfect or not i dont know why there is some error and how to solve it? [code]class perfect { public static void main(String args[]) { int a=o; int n; for(int i=1;i<=n;i++) { if(a==n) System.out.print("Perfect number"); else System.out.print("Not a Perfect number"); } } }[/code] | |
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; … | |
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 … | |
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 … | |
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 … | |
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 … | |
hello everybody; i want to know that how i will open another gui when i click on a button?? thnx | |
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 … | |
Hi there.. In sleep(5000) what type of data is 5000??? Is that an integer or byte or something. Thanks in advance | |
[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(); … | |
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 … | |
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 … | |
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 … | |
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(){ … | |
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 … | |
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 … | |
[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: " … | |
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 … | |
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,,, … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … |
The End.