32,199 Topics

Member Avatar for
Member Avatar for unholy.vlad

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 …

Member Avatar for mKorbel
0
87
Member Avatar for zlloyd1

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 …

Member Avatar for Banderson
0
4K
Member Avatar for fatalaccidents

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 …

Member Avatar for bguild
0
223
Member Avatar for gtkesh

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 …

0
121
Member Avatar for pattmorter

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 …

Member Avatar for pattmorter
0
200
Member Avatar for xHellghostx

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 …

Member Avatar for tux4life
0
599
Member Avatar for learner01

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.

Member Avatar for learner01
-3
248
Member Avatar for lewashby

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++ …

Member Avatar for deceptikon
0
171
Member Avatar for xHellghostx

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 …

Member Avatar for JamesCherrill
0
179
Member Avatar for Violet_82

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 …

Member Avatar for vishnu.khera.5
0
438
Member Avatar for SoulofchaOs

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 …

Member Avatar for JamesCherrill
0
201
Member Avatar for cgogte
Member Avatar for harinath_2007

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 …

Member Avatar for harinath_2007
0
100
Member Avatar for reezn

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.; …

Member Avatar for reezn
0
431
Member Avatar for london-G

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?

Member Avatar for london-G
0
389
Member Avatar for edensigauke

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 …

Member Avatar for edensigauke
0
658
Member Avatar for lakshmi_suchi
Member Avatar for DeepAnalyzer

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"+" | …

Member Avatar for Lucaci Andrew
0
217
Member Avatar for yup790

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. …

Member Avatar for yup790
0
385
Member Avatar for 03hasnam

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(); } …

Member Avatar for Taywin
0
235
Member Avatar for jasonlolwut

I need a source code for JAVA for balancing a chemical equation. CH4 + O2 = CO2 + 2 H20 CH4 + 2 O2 = CO2 + 2 H20

Member Avatar for Taywin
0
2K
Member Avatar for SoulofchaOs

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 …

Member Avatar for mKorbel
0
246
Member Avatar for somaye.s

hi i need to get pixel value of an color image but i don`t know how. i need code for do this.

Member Avatar for radhakrishna.p
0
108
Member Avatar for christiangirl

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 { …

Member Avatar for stultuske
0
812
Member Avatar for LegendX

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 …

Member Avatar for stultuske
0
107
Member Avatar for DJ-DOO

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, …

Member Avatar for peter_budo
0
2K
Member Avatar for rose_anne

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 …

Member Avatar for rose_anne
0
230
Member Avatar for zlloyd1

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 …

Member Avatar for bguild
0
188
Member Avatar for wooof21

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 …

Member Avatar for stultuske
0
190
Member Avatar for kamil555

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, …

Member Avatar for JamesCherrill
0
531

The End.