32,204 Topics
| |
import javax.swing.*; import java.awt.*; import java.awt.event.*; public class PaymentCalculator extends JFrame{ private JPanel panelTitle,panelInput,panelButtons; private JLabel lbltuition, lblmisc, lblscholarship, lblfee; private JTextField txttuition, txtmisc; private JComboBox cbscholarship; private JRadioButton optfull, opttuition,optOther; private ButtonGroup btnpayment; private JCheckBox chkfees1, chkfees2, chkfees3; private JButton btncompute, btnclear; private JList listbuy; private DefaultListModel listmodel; private … | |
hiii.! how to make a hollow square of asterisks by entering a size of side by user, for example if 4 is entered then, it will be print, * * * * * * * * * * * * of 4*4. | |
http://pastebin.com/v4Jd1yTc hi I am following a tutorial which shows how to create tileMap game in java. But i cant seem to understand some of the methods and variables. main code i post it on pastebin.com take a look. problem is I cant seem to understand what is method calculateCorners is … | |
How to install java applications on android ? | |
Hi folks! I need some homework help. I have the following requirements: // Strings required for Homework. String[]strVector = {"octhkeugrk", "fedjigchba", "mnpqdetjhz", "bgxlvfcdaz"}; a) Write code that transforms the string array provided above into a 2 dimensional character matrix, (e.g., char[][] charMatrix;). b) Once in the two dimensional array form, … | |
As an assignment, I was asked to build a java program which can inspect the content of a website, display and download a particular form of media on that web page or the whole web page (depending on the user's need) for offline viewing. I understand I need three components: … | |
Actually, I am working on project and specifications are : * using windows 7 ultimate * using Java language to develop project * using IntelliJ IDE for project now, When i run my project it give me output in the section at the bottom in the IDE itself. But, i … | |
I made this program but it isn't working; any suggestions? /* * Program Name : GuessGame.java * Author : James Resue * Date : October 6, 2010 * Purpose: Write a program GuessGame.java that plays the game “guess the number” as follows: * Your program chooses the number to be … | |
Hey guys! I want to use jtable to encode a grade, this is where i will enter the grade of the student. and when i click the submit button, the data should be in a variable where i can manipulate it and solve for the average. It will look like … | |
I am tring to implement a website search engine with java as an applet,I have used nutch as web crawler and cassandra as my database,I have to use a nosql database(because my teacher wants me to do),now my question is what should I do next to complete my search engine? … | |
Hi I'm trying to write a toString() method for a generic LinkedStack but I'm having trouble My class has two push methods. One pushes elements of some type onto the stack. It takes in some generic element and pushes it onto the stack. The other method takes in some generic … | |
I have been taking few different heap snapshots. What I see is that the memory usage is not the same as reported by this codes. So how to know the exact memory is being used by my java application. I also see my leak report from MAT reports a lot … | |
How do you find the dot product of 2 matrixes with: matrix 1 has arbitrary rows and arbitrary columns- user will input rows and columns, same for matrix 2 (to multiply, rows of matrix 1 must be the columns size of matrix 2 and column size of matrix1 must be … | |
1. There are some error in lion no 15 .can anyone help me to fix this??? 1. import java.util.Scanner; 2. 3. public class intArray 4. { 5. 6. public static void main (String [] args) 7. { 8. final int size =10; 9. int [] array = new int [size]; … | |
package pkg1; import java.awt.*; import javax.swing.*; public class Main { public static void main(String[] args) { JFrame frm = new JFrame("Title"); JTextField txt = new JTextField(); JLabel lbl = new JLabel("To"); JTextField txt2 = new JTextField(); frm.setLayout(new GridLayout(2,2,5,5)); frm.add(txt); frm.add(lbl); frm.add(txt2); frm.setSize(500,100); frm.setVisible(true); frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frm.setLocationRelativeTo(null); } } Someone please explaine … | |
Hi, I'm looking for help to achieve my projet. It's about an application that can be able to send sms to the users mobiles phone and receive sms from them. The project is the developpement of an application which can permit farmers organisation and products buyers to communicate by sms … | |
write a java program that will ask the user to enter his/her name initial - first and last name, and then output a greeting that says "Hello", followed by the user's initial and an exclamation mark.. | |
Cant find this error and all these java scripts are talking together can someone please find it. error has been noted blow. import javax.swing.JFrame; public class WindowApp{ public static void main(String [] args){ JFrame window = new JFrame("A window");//cans et the title on the title bar window.getContentPane().add(new ImagePanel()); window.setVisible(true); window.pack(); … | |
For some reason I am receiving this error , cannot find symbol, method Math random() not found . If anyone knows why it would be of great help. int digit1 = (int)(Math.random() * 10); int digit2 =(int)(Math.random()* 10); this is supposed to give me two separate random digit variables between … | |
The program is supposed to ask the user for the range of the guesing game (1-10), ask them how many guesses they want, and then ask them for a guess. Then it prints out Cold if he guess is greater than 25% of the answer, print WARM if its between … | |
Im kinda still new at java and with help, developed a java file that will take numbers from a text file and calculate a invoice that will format like this: Invoice -------------------------- Account Amount Due 10011 $12.25 10033 $11.70 -------------------------- Total $23.95 I got it to print out to console … | |
| Hi, This is my first post, forgive me for not being immediately familiar with any forum protocols. I am trying to read in a txt file and store the data in my class. I keep running into this error Exception in thread "main" java.lang.NumberFormatException: For input string: "./src.Chance" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) … |
Hello Daniweb, I will soon reach the point where I'm ready to move on my journey of programming. One thing that has always interested me is the mobile world. I would like to develop things for the mobile world. What I want to ask/know is tips from people already developing … | |
Hey Guys Im working on an assignment dealing with arrays. I have to Delete the duplicates in the array and re-display the array with the duplicates deleted. I Have code that I written up that is able to step throgh the process and will display the duplicated elements in the … | |
Hello Everyone, I'm having a lot of trouble trying to figure out how to do this, I'm a beginner and I am completely stumped. Can anyone help me with my program. I have to convert a string array to a char 2D matrix, this is what I have so far. … | |
I am doing a course in recommender systems on coursera.org. I have got an assignment in that. They have told us to use IntelliJ IDE and Lenskit to use. I am very good at C, C++, but not that well in Java. So finding it difficiult to get up these … | |
For some reason my java program can't find my textfile if i use file.next to display contents of the file but if use file.readLine it finds and shows the contencts of the filebut not the way i want for example: I want actual output like this: 1: Humps Black Eyed … | |
Hi, I am using eclipse j2ee juno eclipse market place is not working this is the error i am getting "Unexpected exception java.lang.reflect.InvocationTargetException" give me solution to fix it. thanks for your time. | |
Hi All, I want a make a system logger in java to track all the activity that is going on my system. Like 1)User Login 2)File Copy 3)Other Activities But,Being a beginner I don't have much knoweldge regarding my goal. Please provide your valuable feedback. |
The End.