35,618 Topics

Member Avatar for
Member Avatar for cretaros

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 …

Member Avatar for mKorbel
0
290
Member Avatar for emc22

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 …

Member Avatar for emc22
0
168
Member Avatar for drummershuff

[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 = …

Member Avatar for parry_kulk
0
279
Member Avatar for NewOrder

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?

Member Avatar for JamesCherrill
0
107
Member Avatar for Eric Cute

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 …

0
97
Member Avatar for Inevitable x7

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 …

Member Avatar for thekashyap
0
106
Member Avatar for bharath54321

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.................

Member Avatar for mKorbel
0
74
Member Avatar for bharath54321

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 …

Member Avatar for mKorbel
0
107
Member Avatar for Eric Cute

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 …

0
132
Member Avatar for Inevitable x7

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 …

Member Avatar for audiomatic
0
109
Member Avatar for BEBELINDO

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 = …

Member Avatar for Walter Scott
0
277
Member Avatar for spitfire5295

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? :)

Member Avatar for spitfire5295
0
82
Member Avatar for cretaros

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 = ""; …

Member Avatar for mKorbel
0
193
Member Avatar for sirlink99

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 …

Member Avatar for mKorbel
0
170
Member Avatar for Inevitable x7

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 …

Member Avatar for Ezzaral
0
120
Member Avatar for cabosun

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 = …

Member Avatar for Ezzaral
0
108
Member Avatar for sciprog1

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

Member Avatar for sciprog1
0
120
Member Avatar for aldm

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 …

0
72
Member Avatar for amadeus47

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 …

Member Avatar for Rik_
0
197
Member Avatar for sirlink99

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 …

Member Avatar for Majestics
0
110
Member Avatar for n3red

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 …

Member Avatar for bibiki
0
120
Member Avatar for Hakoo

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? …

0
101
Member Avatar for qweewq22

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 . …

Member Avatar for JamesCherrill
0
163
Member Avatar for Poopster01

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 …

Member Avatar for javaAddict
0
322
Member Avatar for packetpirate

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 …

Member Avatar for packetpirate
0
246
Member Avatar for chudapati09

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 …

Member Avatar for kekkaishi
0
121
Member Avatar for jackmaverick1

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), …

Member Avatar for jackmaverick1
0
222
Member Avatar for Iamthecheese

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 …

Member Avatar for Ezzaral
0
2K
Member Avatar for bhallarahul

Is it possible to write java program for controller or programmable interrupt controller?

Member Avatar for bhallarahul
0
76
Member Avatar for NPDA

how can i solve this error.?? incompatible types found : java.lang.String required: int num=userIn.readLine(); :)

Member Avatar for JamesCherrill
0
91

The End.