32,204 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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, | |
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, … | |
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 … | |
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"); … | |
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; … | |
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 … | |
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 … | |
How can I move an ImageIcon in java? | |
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 … | |
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 … | |
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 … | |
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 … | |
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. | |
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 … | |
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 :) | |
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 … | |
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 … | |
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 … | |
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 … | |
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). … | |
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 … | |
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 … | |
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 … | |
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 | |
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. | |
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 … |
The End.