31,001 Topics

Member Avatar for
Member Avatar for robbiepoo

Ok so im doing a project for school and i made an array to add up the scores. (the project is a learning module, (game)). So heres my code, i have declared everything in my main program (starting one) called science.java and my two other parts of the game (true …

Member Avatar for masijade
0
84
Member Avatar for dev.mena

if chat room members is 4 and each have mic the server receive the 4 packets and resend it in the same order here more delay in the client to run packet 1 and 2 ..... i want to merge the sound and send it to be in the real …

Member Avatar for JamesCherrill
0
105
Member Avatar for mintsmike

Hello people: I am trying to create a ComponentListener method that will resize some components when the window is resized. I have tried the following code, only to find out that it didnt work: [code] import java.awt.event.*; import java.awt.*; public class PowerEvent { PowerMath gui; PowerEvent(PowerMath in) { gui = …

Member Avatar for mintsmike
0
215
Member Avatar for suncica2222

how can I trigger anything outside the method ??? like carry the boolean a outside [CODE]public void windowClosing(WindowEvent arg0) { System.out.println("Window Closing"); a=true; // cant refer to non final variable a inside an inner class defined in a different method[/CODE] I want to use "a" in while loop for instance …

Member Avatar for suncica2222
0
275
Member Avatar for scream2ice

hi everyone Im working on a program that includes hash tables and files. What i'm doing is that I save the information (Name, Student ID, Address, Phone No.) of some students in a text file. I use a hash table to work on the students' information. Things like showing the …

Member Avatar for JamesCherrill
0
95
Member Avatar for stewie griffin

Hi, I have java code, in the code there is about 5 lines that I wont to open in new Thread, I don't wont to crate all new class for 5 lines , can I can I implement the Thread inside the method without new class?

Member Avatar for stewie griffin
0
101
Member Avatar for mbichichi

Hi I am writing a java program for a mobile database that should input from the user three entries (manufacturer, Model and Rating) save this in an array and file and be able to search from the data i the file and print on screen. I have written it but …

0
32
Member Avatar for wonder_laptop

Hello, can you PLEASE put a SIMPLE traceroute code in java. i googled traceroute but i got a bunch of compicated codes. im new in networking programming, i want to implement the traceroute command . i already managed to create a network and wrote a program for the laptops to …

Member Avatar for huj_v_palto
0
180
Member Avatar for Metahuman

Hi everyone, I am trying to set my own calendar in JAVA. What I mean is, unlike the default Calendar I want to construct my own Calendar where a day will be only 13 hours for example instead of the 24 and there will be 30 days in every month. …

Member Avatar for JamesCherrill
0
93
Member Avatar for Mubo

Hi guys, these days Social Networking Sites are spreeding faster around the world and they getting more users into their networks daily. My question ist. How to implement an algorithm as simple undirected graph in social networking site and how to search and find special groups who know each other …

Member Avatar for JamesCherrill
0
142
Member Avatar for Virux

So, I have an interface I would like to use, and I need to put lines on a JPanel within a Frame. Because I need other controls in the Frame so if I set the frames focus to the lines I won't have the controls. And also, I have another …

Member Avatar for Virux
0
4K
Member Avatar for k2k

i need to use java to generate and write/append (long)numbers to a text file and use those data for calculation later. can anyone give me a quick reference on what i should use? i tried: PrintWriter ---> no writeLong() RandomAccessFile and BufferedWriter --> give me byte code i have been …

Member Avatar for masijade
0
151
Member Avatar for djdanjo82

Hello All! First thanks for viewing this thread. My issue is I have a class below that I want to call and the constructor requires a File variable and I do not understand how to declare this so I can call it from my main class. My last issue is …

Member Avatar for javaAddict
0
136
Member Avatar for jackiejoe

I have two elements that I have in a List Object, but am trying to compare these elements and if they are the same return true otherwise false. But am unsure how to get the two items from the list and compare? Thanks,

Member Avatar for javaAddict
0
530
Member Avatar for Xessa

Hello again people. I have a problem. Think of a textarea. The text area is filled with information depending on an entrance in a textbox. Like userID is entered and the information is filled in the textarea. I want the user to edit the textarea. But when he is editing, …

Member Avatar for Xessa
0
116
Member Avatar for titosd

Hello, I have an amazing thing in my code, when I take the date from input txt file, and i put it to an output txt file, there was not the same date, for example: if in the input the date birth for person is: 29/07/1981 when I get the …

Member Avatar for masijade
0
93
Member Avatar for coolbuddy059

I've written a code for JButton handeling.The code is= [code=java] import javax.swing.*; import java.awt.*; import java.util.Calendar; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; // Example using defaultButton and JRootPane.setDefaultButton() public class DefaultButtonExample { public static void main(String[] args) { // Create some buttons JButton ok = new JButton("OK"); JButton cancel = new JButton("Cancel"); …

Member Avatar for Ezzaral
0
209
Member Avatar for MasterGoGo

Hi guys, I have a problem. Im trying to read from a file which contains one, two, three, four. The output I get is one two three four But I want to make it read every other line. one three etc. How would I go about that? [CODE] import java.util.Scanner; …

Member Avatar for Ezzaral
0
107
Member Avatar for Lensva

not directly java yet, however would need some insights if what im doing so far is correct: [img]http://imgkk.com/i/LYge7gtV.jpg[/img] short overview: once an actor has attempted to login he is quering the database to get his permision level determined and is redirected to either user, engineer or manager account-like page that …

Member Avatar for Lensva
0
71
Member Avatar for conan19870619

with java awt.Robot, I can have a sequence of mouse movements. However, I do not know what I should do to stop before it finishes. I was thinking a good way is to use a hotkey to interrupt. Can someone tell how to do that? More generall, how to set …

Member Avatar for Ezzaral
0
56
Member Avatar for mastr924
Member Avatar for Xessa

Hello. I have a stored procedure that brings information from the database. The problem is when i close the window the transaction continues to work. What can i do in my JSP and Java code to prevent this? Does that mean that my transaction is wrong? When the result data …

Member Avatar for masijade
0
76
Member Avatar for IPavel

Here is a question. I wanted my JUnit tests to be more modular and found <snip url> how to mock protected methods[/URL] for that purpose. Briefly speaking, we cannot mock and control calls of protected method with JDK dynamic proxy because protected methods are not in any interface but we …

0
65
Member Avatar for nabeelanwer

import java.awt.BasicStroke; import java.awt.Color; import java.awt.Dimension; import java.awt.*; import java.sql.*; import java.util.*; import java.util.Date; import java.lang.*; import javax.swing.JApplet; import org.jfree.chart.ChartFactory; import org.jfree.chart.ChartPanel; import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.renderer.category.LineAndShapeRenderer; import org.jfree.data.category.CategoryDataset; import org.jfree.data.category.DefaultCategoryDataset; import org.jfree.ui.ApplicationFrame; import org.jfree.ui.RefineryUtilities; //import org.jfree.chart.demo.Time; /** * A simple demonstration application showing how …

Member Avatar for peter_budo
0
299
Member Avatar for coolbuddy059

Can you help me with source code to get the date 1 jan 2009 in the format 01 01 09. Actually I've to form a verification id for issuing gatepass which uses last two digit of the year,then net two digit consist of month and next three digit consist of …

Member Avatar for javaAddict
0
110
Member Avatar for farag

I would like to take J2ME certification, I heard that it has not a certification guide Is it real :sad: or not :) ? In all cases, I want a certain tutorial in J2ME to study it for certification. Thanks in advance.

Member Avatar for peter_budo
0
129
Member Avatar for jjohnson33

i want run an applet as an application and i want to run an application as an applet. i know there is a way to do it with only two lines of code i just can't figure it out. do any of you know how to do this? any help …

Member Avatar for umay
0
364
Member Avatar for Web_Sailor

Hi, I was thinking of adding a zooming feature to my program as continuation from my previous thread. Link below:- [url]http://www.daniweb.com/forums/thread196644.html[/url] So that I can keep my mouse on any rectangles and drag my mouse to zoom in. Any suggestion ? Thanks for all your guidance :)

0
44
Member Avatar for BestJewSinceJC

Ezzaral & James -- I remember (and found) a thread from a while back where you guys gave me an example of an Observer pattern. Basically a model had a List of interested Listeners. When the model changed, it went through a for loop, notifying each listener (the views) that …

Member Avatar for BestJewSinceJC
0
71
Member Avatar for Olsi009

Hey ppl, i am trying to do this exercise from my java book, but i cant do anything right apparently :( [I]Write an application that asks the user to enter an integer n, and then draw an n by n grid on the panel. whenever the user clicks inside one …

Member Avatar for Ezzaral
0
228

The End.