35,618 Topics
![]() | |
I am trying to make a program that outputs a triangle and the program then should asks the user to enter the size of a triangle to print on the screen. After getting this number, the program should then print a triangle to the screen by printing a series of … | |
public class Strength3 extends ConsoleProgram { private static String[] blank; private static String it; public void run(){ blank = new String[5]; for (int i=0; i<5;i++){ blank[i] = "-"; it+=blank[i]; } println(it); } } why does it print 'null' first. all i want is just 5 hyphens...thanks | |
how to make video lecture application??have any idea??help me please :'( | |
hi... I have some questions... Firstly, I have an ArreyList that is stored two String "Name", "Description" This is a database of students [CODE]private void addStudents () { addStudent("ABC","lalala"); addStudent("DEF","hohoho"); }[/CODE] I also have the methods that adds, modify and delete students from the term list. [CODE]protected boolean addStudent (String … | |
Hi everyone.... I want to develop a music lexicon (tyoe band name --> give description) and I want to add terms (bandName and description) I use ArrayList but I want to change. I have also the code that read a [B]text [/B]file (bands.txt) but I dont know haw it works... … | |
Firstly... I am a new in Java... I have a music dictionary that use an arreylist to store the terms and definition The user use the terminal to interact with this dictionary. [CODE]private void addTerms () { addTerm("Anathema","Atmosheric metal band from Liverpool, UK." } [/CODE] Because, I would like to … | |
hello friends i m larning core java.i want some write code of some program by in which i can use the concept of opertors,inhertance so plz me assignment so that i can do practic. | |
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(){ … | |
I am trying to make a servlet thread-safe by synchronizing a block of code.The counter needs to count how many times a page has been visited.But it starts at 2 and when i refresh the page, it increments by 2(so it goes 2,4,6).I tried to remove the object variable while … | |
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 … |
The End.