32,204 Topics

Member Avatar for
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
153
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
140
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
531
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
270
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
108
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
72
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
309
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
403
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
45
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
234
Member Avatar for mastr924

This is part of a connect 4 game. I'm trying to get a picture to move each time a player makes a move by calling paintComponent but java won't let me. How do I move a picture in my code? [code] import javax.swing.*; import java.awt.*; import java.awt.event.*; public class PanelC4 …

Member Avatar for Ezzaral
0
90
Member Avatar for Yurii

hello everybody, i ve got a question about my first java program. im trying to write a planner to which you can add tasks or appointments. i created dialog boxes for the user input and they acutally do work. but i want to avoid errors by telling my programm what …

Member Avatar for BestJewSinceJC
0
93
Member Avatar for BestJewSinceJC

In one View, I have text boxes and buttons. In the other View, I have a Pie Graph that I created using JFreeChart. When the button is clicked, I want the Pie Graph to be refreshed, displaying the new percentages (based on what the user entered in the text boxes). …

0
54
Member Avatar for Xessa

Hello people. I seem to connect and select the data i want from a specific and big table. But when the information to be selected is small, everything is allright. But when i try to select information that is not that much small. For example when i select from 3000 …

Member Avatar for Xessa
0
103
Member Avatar for _Rosie_

write an application that finds the smallest and average of twenty floating point numbers entered by the user.Use a for loop to capture the user input and store the numbers in an array. display the smallest number and the average of the numbers entered i urgently write this program can …

Member Avatar for stultuske
0
130
Member Avatar for kingarthur

Hey everybody, i am writing a "database based" application. i organized my GUI with different frame- and panelobjects, which need database information (connection, uernames etc). is it possible, to define those information in an external files and just import these data (like in php)? i tried a solution with an …

Member Avatar for kvprajapati
0
88
Member Avatar for Kishorey

HI, Can Someone help me to do the refresh operation in Java.I need to refresh the panel in java every 5 seconds ..can someone help me provide the code

Member Avatar for Kishorey
0
98
Member Avatar for saptaparni

how do i generate a .html file using java? i need 2 read from a file file and display an applet in a web browser. So i need to include the main() and cannot run an external .html file. Please help.

Member Avatar for kvprajapati
0
59
Member Avatar for coolbuddy059

I've been writing code to develop gatepass system for my college. I've to made space for taking the photograph of the visitor taken by the camera at gates and then save the whole page in the database(actually the structure is already defined). Please suggest what to do.The code I've made …

Member Avatar for kvprajapati
0
164

The End.