35,618 Topics
![]() | |
Here; is my scenario; A prisoner is admitted in a prison at this date:: [B]2011-05-05[/B], he was sentenced for [B]5 years[/B] so how do i calculate date additions so the results give me [B]2016-05-05[/B], as this is the exact date he is to be released from prison. the addition should … | |
I'm trying to create a class that calculates for the next possible coordinate for a Bishop Piece for my chess program and I encountered this problem. I used a JOptionPane to test for the results and I can't understand how it got that result. The first JOptionPane shows false because … | |
[CODE]import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; import java.io.*; public class MuseumPanel extends JPanel { private JLabel label; private JPanel buttonPanel; private JButton week, day, hour, output; private Museum museumArray = new Museum(); private int numb; int[] weekArray = new int[3]; int[] dayArray = new int[7]; int[] hourArray = … | |
i know that it puts the bytes into a buffer. But is that buffer is located somewhere in the memory? and doesnt it make the application slow if it uses that adapter?/Stream? | |
Hi everyone, Im trying to download all files in a directory residing in the server to clients pc. I know how to download single files using response.getoutputStream(). My problem is I want to download ALL the files in that directory with a single click of a button. i tried iterating … | |
Alright im really struggling here... I have a multiple buttons that can be pushed and within the action listener i want the item added to my list model, and the running total to be incremented by the amount i specifiy within the actionperformed statement. for whatever reason i am having … | |
TableColumn column1=table.getColumnModel().getColumn(2); column1.setPreferredWidth(400); I tried to change the column width of the jtable using the above method but i couldnt achieve i dont no why please help me................. | |
I have created one Jframe mainframe which size is fit to monitor size. I have created another frame called subframe which size is 300,300 . My problem is when i open the subframe from the mainframe iam not suppose to use mainframe without close the current frame . How can … | |
Hello Everyone, Im needing a bit of help here. First, Im trying to let client download a file from server and save it on client's pc. When client clicks on button "DOWNLOAD", it will call a servlet that will download the file. Expected outcome is that a SAVE AS DIALOG … | |
First of all, i have a program where when i click a button an item is added to a list and at the same time i'm trying to get a double to display elsewhere. I am just in a funk right now and cannot think properly. what is good. when … ![]() | |
my code plays a midi java sound file , but i want to play it in a loop constantly ! can somebody help me please ! [code]import javax.sound.midi.*; import java.io.IOException; import java.io.InputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; public class MidiPlayer{ public static void main(String[] args) { try { Sequencer sequencer = … | |
I am trying to output every single possible combination of a string. So if the string was "abc" it should output a b c ab ab ba bc ca cb acb bac bca cab cba Is there any method that would help me do this? :) | |
I want to dump or backup a mysql database on button click, i have the following logic, no errors bt it cant execute, can anyone help me in identifying the error. the code as follows: [CODE] try { String dbName = "xxx"; String dbUser = "root"; String dbPass = ""; … | |
I am tying to use Gridbag layout, but I cannot seem to get it working. [URL="http://img703.imageshack.us/img703/1461/photo00002y.jpg"]here[/URL] is the plan. and here is the code: [CODE] import java.awt.event.*; import java.awt.*; import javax.swing.*; import java.net.*; import java.nio.*; public class Chatroom implements ActionListener { public Chatroom (){ JFrame frame = new JFrame ("Warrior … | |
Hey guys, i'm new to the Java and have stumbled on a few things. When a button is clicked on my program an string is printed to a JList model. Ex. Snickers Bar ............$1.00 Now what i am trying to do is keep a running total of all these items … | |
So im doing this swing java gui project where the admin can login and search, modify and add users to the database mysql. Im having trouble putting in the right getParameter to get: type = radio group button of 2 with 1 as Doctor and 1 as Nurse Specialty = … | |
Hello Members, Is there any Permutation API in Java? I found the following: [url]http://www.jsc.nildram.co.uk/api/jsc/combinatorics/Permutations.html[/url] I am unable to figure out what should be the import statement for the above API. I would be grateful for any help. Thank you! sciprog1 | |
Hi, I would rather search on google, but I have a little time, so I need to do this very quickly. Can anybody tell me how to step-by-step configure web work java framework. I downloaded version 2.2.7? What should I do to use it on my computer? I have installed … | |
Running Win 7 Ultimate 64 bit 9GB mem, two RAID 0 500GB drives - Dell Studio XPS Desktop. Trying to update Java (jre-6u25-windows-x64.exe). Tried everything found on this site and others. Keep getting Error 1714 which Oracle said they have no info for. Suggestions? Tried installing several older versions but … | |
I have a general idea on how to start. I would need a gui with a screen to display the text and a JTextField to write the text and a send button. I would also need to import the java.new package to connect between the computers, but other then that … | |
Hi, I am writing a simple script, basicly i have: [CODE] String s = "A quick fox jumps over a lazy dog"; [/CODE] Now i want to print it like this: (like 3 words per line) :: A quick fox jumps over a lazy dog Know i know i can … | |
Hello Friends, I have one problem that, I am passing query string from Mobile to Server. Now problem is Spaces and some symbols are not allowed in URL. So,I encoded somehow before sending it. Now the problem, how to decode(I know to decode by using URLDecoder.decode(Request.getQueryString)) and retrieve the values? … | |
Hello friends . I have some problems . I want to Implement a stack and use 2 jButoons for push and pop and a jlist for showing the pushed elements . I write this code but it dont give me good result ...! please help me compelet this program . … | |
This is my first time writing an array of objects and I’m having an issue putting it all together. I have written two classes and the third program that is supposed to test the classes. ***PROBLEM*** My primary issue at the moment is that my program to test the classes … | |
I'm not sure if it's the way I'm sorting this ArrayList or the way I'm constructing new Term objects. Can anyone tell me what's wrong? My program is too long, so I'll narrow it down to the parts that are giving me trouble: The declaring of the terms and new … | |
![]() | I'm creating a calculator, and I'm required to have a feature of key press. Ex: I have a GUI with each numerical value (0 - 9) has a button. Now when the user press 7 on the keyboard, I need buttonSevenActionPerformed to be invoked. The signature of buttonSevenActionPerformed is: private … |
Hi! I'm looking to be able to add a user created extension to a program I'm making. The extension should be able to execute on it's on accord, then pass control back to the program when it's done. So, Say I click a button (it's got a GUI on it), … | |
Okay, so I have a rather easy problem that I can't seem to figure out. I'm getting cannot find symbol errors for T item=(T)input.next(); The program is a test file for a Binary Tree program. I was told the input 'item' has to be in T type. Obviously they have … | |
Is it possible to write java program for controller or programmable interrupt controller? | |
how can i solve this error.?? incompatible types found : java.lang.String required: int num=userIn.readLine(); :) |
The End.