32,199 Topics
| |
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 … | |
is it possible to implment OLE in java. Can you send the link where I can know about it + (if possible)then ways to implement it. | |
My friend and I are in the process of build a MUD in java. We took Java in highschool, he is continuing with computer science in his college, I am not. I am surprised how much I do remember, but there is a lot I have forgotten. Previously my friend … | |
hi, i want to make a program that highlights java buttons present on a frame just by bringing mouse over the buttons and this frame may not be part of this program ie it can be from another program but i dont know how to proceed any suggestions..... | |
Hi over there, is it possible to execute several SQL Statements with one(!) command? For example something like that: [code] Statement s = con.createStatement(); sql= "CREATE DATABASE MeineDb+ SHOW databases+ USE MeineDb+ CREATE TABLE MeineTestTabelle ( i INT, c CHAR(3), s VARCHAR(8), dt DATE )+ CREATE TABLE MeineAdressen ( Name … | |
[code=java]import java.io.*; public class bonus{ public static InputStreamReader reader=new InputStreamReader(System.in); public static BufferedReader input=new BufferedReader(reader); public static void main(String[] args) throws Exception{ double salary,bonus; System.out.println("Enter Employee's Monthly Salary: "); salary=Double.parseDouble(input.readLine()); if(salary>=6000){ System.out.println("The bonus is 6000"); } else { bonus=salary*.5; System.out.println("The bonus is "+bonus); } } } } // It only … |
The End.