32,199 Topics
| |
Hi all, following is the code for a simple but pleasant animation (3000 colourful circles with random sizes etc. bouncing off edges of the app window) What I have problem with is getting the "coef" to be automatically updated on "jSlider1" change in order to control the animation speed Also … | |
I am attempting to make an interface with textfields where the data entered into the fields is stored in a variable, and then written to an external file. I am trying to use FileWriter fw = new FileWriter() to tranfer the variable to the file, but I cannot find an … | |
Hey everyone, I'm new to the concept of stacks and queues. I think I have the basics, but I have a quick question. If I am wanting to swap an object, say x, for another object, say y, in a stack or a queue, is this possible without introducing an … | |
Hello everybody. Here is my remove method for bst. As you all know, there are 3 cases to consider while removing a node from bst. For the last case, when a node (which is to be removed) has 2 children, I want to use predecessor instead of successor to change … | |
Hey everyone. I was doing a simple test program today that my professor is asking us to do just to test to see if his Ant script works correctly and I came across a problem that is confusing me. My prof wants us (after created all of our homework class … | |
Hello Is there anyway to move a string array elements to a vector and have an output that list these elements? Let's say the array contains the following elements `String arraySize[] = {"A", "B", "C", "D", "E"};` and I want to move these elements to a vector.. How would I … | |
Rewrite above program such that the processes instead of threads are created and the number of child processes created is fixed as two. The program should make use of kernel timer to measure and print the real time, processor time, user space time and kernel space time for each process. | |
I use Mint Linux. What do I need to get in order to get started programming in java? Is there a particular IDE that is good for Java or should I just stick with vi(m)? My skill level is as follows. Iv succesfully written a date validation program in C++ … | |
I am having a problem with a program I wrote.. For the life of me I can't figure out what's wrong with the program.. the program should calculate a random value and then outputs an intrest rate and present value.. The problem is that I am getting zeros instead of … | |
Hi all, I have just installed the jdk on a windows7 machine 64bit. I run the first test application in the terminal and got the following message: "'java' is not recognized as an internal or external command, operable program or both file". So I had a look online and found … | |
There are 2 sets of 4 buttons being created. The `ImageIcon` of the 1st set of buttons are to be dragged onto the 2nd set of buttons. The boolean `enab` variable is for determining if the 2nd set of 4 buttons are enabled or not. I initially set the boolean … | |
Please can anyone give me proper link for learning basics of JAVA... | |
Hi, I am messed up with jscrollbar in my applcation.I have a jtextarea with jscrollpane in my application. Whenever the text in the textarea fills up completely , i want the scrollbar to scroll down. As soon as new text is added to the textarea , the scrollbar should move … | |
hi what i want is to separate a file in many variables and store it in an arrayList to use it for creating objects and printing. The file is as follows: L1234; Land; 50000 euros; 120 sq.m.; Artemida Attikis; near the sea; for sale FF4234; Flat; 120000 euros; 72 sq.m.; … | |
Hello, When I am trying to build my application in Netbeans I have this error message coming up in the output. null575775 is invalid. I have check the null file but there is nothing in there. Any ideas? | |
Here is my code, and i would like to read images from my mysql database and display it over a JButton using the BufferedImage casting into Image. Everytime i want it to display, it would fail to read the data and run to the Exception, may i please have help … | |
loop through javascript show and hide div | |
Hi, I put a JTextArea on mu gui.But i can't print multiple lines on that?Why is that?.I have created a Item class and then created an Item object array in my gui.Then i print it on my jTextArea.This is my code i have put in my button. jTextArea2.setText("Item Name"+" | … | |
In the main class the user enters text trying to find the file in the same directory as the source file. The string gets passed into the constructer and a file object is made but the file isn't found. The print statements are just to find out what is happening. … | |
From Class Model: public TableModel getTableData() { TableModel model=null; try { String sql = "SELECT eventID as 'Event ID', date as 'Date',eventName as 'Name', time as 'Start Time' FROM Event"; pst = conn.prepareStatement(sql); rs = pst.executeQuery(); model = (DbUtils.resultSetToTableModel(rs)); } catch(SQLException e){ e.printStackTrace(); } finally { try {rs.close(); pst.close(); } … | |
I need a source code for JAVA for balancing a chemical equation. CH4 + O2 = CO2 + 2 H20 CH4 + 2 O2 = CO2 + 2 H20 | |
I am coding an image puzzle game and one part of the code is to compare the pieces the user has selected to the pieces of the correct image to check if it is correct. Each image piece is already added to a JButton as an ImageIcon. An identifier is … | |
hi i need to get pixel value of an color image but i don`t know how. i need code for do this. | |
Hello, I am getting Identifier expected and Illegal start of Expression erros in this code: [code] //"Math is our Game" - A math testing program for First through Fourth grade students //Import GUI packages import javax.swing.*; import BreezySwing.*; import java.awt.*; import java.util.Random; //import TurtleGraphics.*; public class Math extends GBFrame { … | |
import java.util.Scanner; public class Lab7 { /** * @param args */ public static void main(String[] args) { Scanner scan = new Scanner(System.in); int counter = 0; String[] letters = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}; final int ROW; final int COL; System.out.println("Please enter the total number of rows: "); ROW = scan.nextInt(); System.out.println("Please enter the … | |
Hi, I'm hoping someone out there can help me, I am trying to create a basic application that transmits GPS co ordinates of the device to a server. I am a complete noobie to socket programming (well, I covered the bare basics in college this year). As a stepping stone, … | |
Hello, Me very new to java prgmng and got to redesign a C proj in java. Might be very insane question but not for me. My c poject has a file, called headerfile.h and the structure looks like this #define ID_File1 0x6F01 #define ID_File2 0x6F02 ... .. likewise all constants … | |
I have a program that creates a GUI with three text fields in it, and two of these fields is supposed to accept a numeric value. I want to know how to get the numeric entries and store them in a variable for further calculations please. I know how to … | |
requirement: Design, Implement and test the Invoice class An Invoice class groups InvoiceItems into a single object. Each Invoice has a unique serial number:the first Invoice has serial number 1, the second has serial number 2, etc. (Hint: implementing this will require a static variable.) A newly created invoice will … | |
I have a project. the project is: In the game of craps, a pass line bet proceeds as follows. Two six-sided dice are rolled; the first roll of the dice in a craps round is called the "come out roll." A come out roll of 7 or 11 automatically wins, … |
The End.