32,204 Topics

Member Avatar for
Member Avatar for hwoarang69

first buid array with images's --90 images PImage pic[]; void setup() { size(900,900); pic = new PImage[90]; for(int i = 0; i < 90; i++) { pic[i] = loadImage("section_"+i+".jpg"); } frameRate(0.5); smooth(); } than prnt image on screen int i = 0; int counter = 0; int flag = 0; …

0
82
Member Avatar for Yarra

hi, so i coded a projectile motion java applet, not only with this but with many other programs i get problems which seem to me to be a memory issue. But the first time lets say I shoot hte projectile it will not show the screen until it has landed …

Member Avatar for Yarra
0
147
Member Avatar for koppche

I have to do a program dealing with 2 bank accounts. I must have a balance and a number of transactions. It also has to deal with draining a customers account and transfering the amount into the account that called the method. I have the rest of the code written …

Member Avatar for Taywin
0
133
Member Avatar for Otter992

Basically part of my project was to take the rows of pixels from a picture and make each row display twice, and the same for the column, and then eventually do them both together. However, I am having trouble with my loop to duplicate the rows or column. What I …

Member Avatar for Taywin
0
194
Member Avatar for nah094020

Ok so this is my task: Description: Create a generic class called GenBinTree. GenBinTree will use nodes that store a value of the generic type to store its contents. This tree will not be a search tree (no ordering of nodes by value). What ges me its the the part …

Member Avatar for Taywin
0
647
Member Avatar for bleedi

Hey there, I've got a small problem. I'm writing an UDP client-server system, and I wanted to use streams with UDP. I found [UDPOutputStream](http://www.java2s.com/Code/Java/Network-Protocol/UDPOutputStream.htm) source and pasted it into my project. Now, when I try to initialize it, it freezes. This is how I try to initialize it: outStream = …

Member Avatar for bleedi
0
270
Member Avatar for dragonshadow001

Hello I'm tring to creat a specific Look in my Java JUI but my code is giving me errors when I try and launch it. Here is my code please take a look and tell me where i'm going wrong. Its a simple login interface for my program: import java.awt.*; …

Member Avatar for richieking
0
249
Member Avatar for LianaN

Hi! I'm trying to create a method for simultaneous dragging a group of JLabel components. First, I select the components to be dragged ([ICODE]getSelectedStatus() -> true[/ICODE]), and then I want to be able to drag the selected components. I have a working method for a single JLabel component, but there …

Member Avatar for anami
0
145
Member Avatar for Delnith

I am looking for your opinions on the best site or book in order to learn java. I am currently in school for C.S. learning C and would like to expand my knowledge. Thank you in advance.

Member Avatar for stultuske
0
273
Member Avatar for shaun smith

Hi, I'm using IReports to generate reports to my netbeans project. The reports which dosen't contain a chart, runs in the run time(Netbeans) and execute well. but when i add a bar chart to the report it gives the following exception even though the bar chart report successfully compile and …

Member Avatar for stultuske
0
177
Member Avatar for gotto

I am currently making a game and am working on the town code right now. I have booleans for the areas in and out of the town, but when I go to leave an area it resets me back at the beginning of the program. I have it set to …

Member Avatar for Adak
0
156
Member Avatar for gingerfish

hi whats the meaning of these signs? for example: [B]System.out.printf("[COLOR="Red"][U]%6s %6s %10s[/U][/COLOR]", "x1", "x2", "(y1, y2) \n");[/B]

Member Avatar for javaboy123
0
9K
Member Avatar for nagachaitanya

I want to add another Page to my Applet when clicked Submit, and to be clear need to retrieve data from the server where data is logs. please let me know what shall i do. package com.stage.logs; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.applet.*; import javax.swing.*; import javax.swing.plaf.TextUI; public …

0
66
Member Avatar for efth

Let's say I have a method called 'test' which should return the arraylist called 'theList' containing X number of Integers. How would I do that? public static void test(){ SOME CODE ... return theList } What should 'void' and 'theList' be replaced with in that code to make it work?

Member Avatar for efth
0
316
Member Avatar for utchia

Hi there i am trying to write a java code that will essentially be like a gps but a lot simplier and i need to make a mini map about 4 by 3. where Dunada and Government is the first intersection and i have already done so by using multiple …

Member Avatar for Taywin
0
136
Member Avatar for Kayla1993

I can not figure out why my code won't work. public static void GenerateRandomTriangles(int numTriangles) to create a file RandomTriangles.dat having the following format (including some comments like the ones shown below) with random integer coordinates (x, y) of the three vertices of a triangle. Each x and y will …

Member Avatar for Kayla1993
0
178
Member Avatar for nimmo

as i m working on implementation of rsa algorithm,and during maiking console of it i found an error int cannot be dereferenced and i m unable to solve it because of working on java first tym...help me here is my code import java.lang.*; import java.math.*; import java.util.*; class rsa { …

Member Avatar for Taywin
0
152
Member Avatar for Aditya.gtbit

Please help me...How to connect a jfilechooser and a jtree that takes the file system view of my pc..i need whenever a node is selected in jtree it automatically set as a current directory in the jfilechooser..

Member Avatar for BestJewSinceJC
0
569
Member Avatar for xixi.li.7

I create a UnorderedLinkedList to split my sublist public class UnorderedLinkedList<E extends Comparable<? super E>> extends LinkedList<E> { public void splitMid(LinkedList<E> subList) { Node<T> current;//the head pointer Node<T> mid;//the mid point //Node first = firstNode; //Node last = firstNode; //Node subListFirst; //Node subListLast; int i; if(head == null) { subList.head …

Member Avatar for xixi.li.7
0
161
Member Avatar for rajilakshmi

I want to create a windows appliation in java using Swing in Netbeans. I want to create the student maintenance details, with Mysql as backend. I dont know how to load the frames in single form. Example, if the user give user name and password in the text box and …

Member Avatar for stultuske
0
127
Member Avatar for sagaragrwal197

Hi sir, I am student and I like to know about the algorithm for developing a MLM software for my final submision So, kindly tell me which algorithm works for the MLM software developement...need urgently please help....

Member Avatar for Taywin
0
321
Member Avatar for alfiechiong

hi i need help is there anyone here have the knowledge of java to retrieved files in the folder and print it out im using this script File folder = new File("your/path"); File[] listOfFiles = folder.listFiles(); for (int i = 0; i < listOfFiles.length; i++) { if (listOfFiles[i].isFile()) { System.out.println("File …

Member Avatar for Taywin
0
171
Member Avatar for taylor.mitchell.353

I took a different view with Delete States. I decided to implement it like the InsertAfter method by using a Boolean, but I am pretty sure I am doing it right, but it only displays one state after I implement it. My Code for the Delete /** * * @param …

Member Avatar for Taywin
0
157
Member Avatar for RozenKristal

import java.util.*; public class ArrayListTesting { public static void main(String []args) { LinkedList<String> list = new LinkedList<String>(); list.add("apple"); list.add("pear"); list.add("tree"); Iterator <String> iterate = list.iterator(); System.out.println(iterate.next()); System.out.println(iterate.previous()); System.out.println(iterate.next()); System.out.println(iterate.hasNext()); } } it keep telling me it an error.

Member Avatar for stultuske
0
267
Member Avatar for k22mac

Hello my question is fairly simple though I can't seem to find the solution. I'm writing a program that basically calculates the area of different shapes. I am making a seperate method per shape to do the calculations but in my main method I need to call the method according …

Member Avatar for JamesCherrill
0
189
Member Avatar for Seswing142

Here is my Code...Im just confused on how to make a Driver class for this. Any help would be great! I know there shouldnt be a Main but it was the only way i could test my drawing on eclipse since i dont really get how to use a driver. …

Member Avatar for Seswing142
0
95
Member Avatar for Yoink

Hi, I had an assignment where we had to fox a program and get it working correctly. I fixed 99% of the problems and the program runs correct. The only thing that is wrong is my insertionSort() method. It runs correctly, but in the wrong order. Currently its listing names …

Member Avatar for Yoink
0
3K
Member Avatar for taylor.mitchell.353

I have to insert State objects into the link list, but the linklist is sorted I placed my notes in my code. Any help would be appreciated. public void insertAddStack() { int probe=0, index=0; States key=null; for (; index < addStackItems; index++) //loops through keys { for (; probe < …

Member Avatar for taylor.mitchell.353
0
329
Member Avatar for pmark019

This code is a java code. Can you please help me convert this to c#? private static URL URLObj; private static URLConnection connect; static String source = ""; public static void main(String[] args) { try { URLObj = new URL("http://students.usls.edu.ph"); connect = URLObj.openConnection(); connect.setDoOutput(true); } catch (MalformedURLException ex) { System.out.println("The …

Member Avatar for cale.macdonald
0
465
Member Avatar for oneoderja

Ask an user to type in a password, a qualified password should follow the constraints, such as: Length of password >= 8 Include at least one uppercase character Include at least one lowercase character Include at least one integer Include at least special character Write a program to check if …

Member Avatar for Taywin
0
149

The End.