that is i've got an array of buttons and i want to replace two buttons (their location on the screen) by clicking on first and then clicking on the second to replace thier location i.e. when i click on button1 first (which is at the first location in a row of buttons on the screen) and then button5, then these two button should replace locations i.e. after clicking on button5 at the fifth location in a row of buttons button5 goes to the location of button1 and button1 goes to the location of button5. Is there any way that i …

Member Avatar
Member Avatar
+0 forum 3

I am trying to implement a simple client/server app using a DatagramChannel to pass ByteBuffers. The client seems to connect okay and the number of bytes returned from the write method is correct; however, the server side never seems to receive anything Server side: DatagramChannel inchannel; DatagramSocket ds; CLIENT_ADDRESS = 5000; public void runServer() { inChannel = DatagramChannel.open(); ds = inChannel.socket(); ds.bind(inAddress); inChannel.connect(new InetSocketAddress("localhost", CLIENT_ADDRESS); ByteBuffer inputBuffer = ByteBuffer.allocate(512); //plenty big enough at this point print statements indicate that the channel is open and connected while(true) { try { if (inChannel.isConnected()) { //it is inputBuffer.clear(); //prep for reading SocketAddress sock …

Member Avatar
+0 forum 0

Hi Everyone, I would just like to enquire with you java experts out there is that in the past java used to have a bug in which when you are using the rtf swing editor and want to save the document only the text gets saved and not the pictures. Can someone please tell me if this bug is still there or has it been ironed out. Yours Sincerely Richard West

Member Avatar
+0 forum 0

hello! I should create a graph bipartite in java language.The graph have 50 knot at left and 50 knot at right with 50 edges from one knot of left to every knot at right.Every knot have a weight and I should compare a knot in the left with a knot in the right! Can I HELP me ,please? by!

Member Avatar
+0 forum 0

Hello every1. I'm having a tough time trying to make a button(when clicked) link or point to a partucular file(e.g setup file) and run that file within the same system. Please help! :( a little code will help. thanks in advance

Member Avatar
Member Avatar
+0 forum 1

I am creating a notepad application .... and I want to change the font of the selected text in the JEditorPane .... but when I change the font now ... it changes the font of the whole text .... same is the problem with background and foreground colors.... :o

Member Avatar
Member Avatar
+0 forum 1

I need someone to help fix the following code and re-write into IF-THEN logic? [code] public class Mystery4 extends Applet{ int clickCount=0; public boolean mouseDown(Event evt,int x,int y) { clickCount++; repaint(); return true; } public void paint(graphics g) { g.drawString("Click 10 times!",80,30); g.drawString("Clicks: "+clickCount, 120,50); switch(clickCount) { case 0: g.drawString("You haven't clicked yet!",70,100); break; case 1: g.drawString("You clicked once!",90,100); break; case 2: g.drawString("You clicked 2 times!",80.100); break; case 10: g.drawString("You click 10 times!",90,100); break; default: g.dawString("You click more than 3 times,",50,80); g.drawString("but not 10 times!",90,100); } } } [/code]

Member Avatar
Member Avatar
+0 forum 4

Hello everyone.Is it possible to divert keyboard imputs to do nothing(e.g when F1 is pressed it must do nothing,when refresh(F5) is pressed ,it must do nothing etc.).If yes, i'd like 2 know how its done. ani help will b appreciated thanx in advance

Member Avatar
Member Avatar
+0 forum 2

Hi i am allen :lol: I have been developing a small software package which incorporates Address details. Now i have created the design using swing. I am using Oracle as backend. I am facing three specific problems. 1) I have added JTree using hashtable, but wen i add subnodes like A, B, C...its getting displayed in the reverse order like z, y, x... 2) The Jtree is on the left hand side of the window. But when i click on menus, i am not able to view the part of menu as its view is overlapped/restricted by JTree. Is there …

Member Avatar
+0 forum 0

Dana, I am a Beginner in java and I need help desparately. I have a project that I have been assigned and it is to biuld a functionality to process a credit card batch payment. I have done most of the work, now it's time to do the implementation and I don't know where to begin. I already have my use cases and the sequence diagram, but I can't seem to get started on biulding the classes, etc. Could you please show me how to get started? [font='Times New Roman'] [/font]

Member Avatar
Member Avatar
+0 forum 1

Hi My name is richard west and i am wondering if anyone knows how to use windows common controls in java. By common controls i mean open file dialog, save as dialog, font dialog and etc. Please if someone knows please e-mail me the codes at [email]freesoft_2000@yahoo.com[/email] or show me the codes and how to do it in this forum. someone please please help me Thank you Yours Sincerely Richard West

Member Avatar
Member Avatar
+0 forum 1

I get errors targetting the ' that I use for each case. I tried using nothing and also quotes in their place, but no luck. Whats the problem. If this isn't the place to get help with programs, please point me in the right direction. import java.util.StringTokenizer; class Birthday { public static void main(String[] arguments) { StringTokenizer st1; String birthday = "09/08/1900"; st1 = new StringTokenizer(birthday, "/"); String month = st1.nextToken(); switch (month) { case '01': month = "January"; break; case '02': month = "February"; break; case '03': month = "March"; break; case '04': month = "April"; break; case '05': …

Member Avatar
Member Avatar
+0 forum 8

Hi there. for the last couple of weeks I am trying to find a solution to my problem but with no luck. There is a program written in C++ which can fine the mac addresses of the bluetooth addresses that are in range. As soon as it finds them, it saves them automatically in a text file on the hard drive. It saves JUST the mac addresses. And what I want to do now is to create a stats page OR just a table which can get the data from this text file (ie get MAC addresses) and depict them …

Member Avatar
+0 forum 0

I have recently installed GNU Emacs and other Java software on my pc. I seem to encounter an error while attempting to comile a program. The error says: bash.exe: warning: could not find /tmp, please create! The file where my programs are kept is C:\Java\*.java I do have a file within my C-drive C:\tmp If you have any suggestions on how I may fix this problem, I would be grateful, Thanks

Member Avatar
+0 forum 0

I am running a java database Manager under solaris the main command is $ java DBMan & I run this and get the following error Exception in thread "main" java.lang.NoClassDefFoundError: DBMan My ClassPath is set to the below CLASSPATH=/opt/VCNsrv/bin/java/DatabaseManager/DBManager.jar This IS the main path to the .jar file that contains the class files. I have also written, compiled, and successfully ran java "Hello World" So I know the PATH is correct as well. Does anyone have a clue what may be the problem? Thanks in Advance

Member Avatar
+0 forum 0

I am doing my homework right now. my program is providing 3 slider that user can choose RGB value and fill the color in rectangle. also everytime when the user slide the slider, there should be a JTextField can show the value which the user choose. my problms are: I don't know how I can write the value from the slider to JTextField. I want to write the value into JTextField and by the time, the slider should slide to the value which I just enter. is there any one can help me how I can do those 2 things? …

Member Avatar
Member Avatar
+0 forum 2

I need your assistance in acquiring java code knowledge.

Member Avatar
+0 forum 0

my code is posted below the program is to be very simple just just a button a choice box a text box and a canvas the user is to be able to select what item they want and then the price appears in the label....then the user is able to put in a quantity and when they hit order the program should calculate the price and display it nice and neat in the canvas....I'm new to Java and ...if this were C++ I could do it in an hour I just don't understand why it's not working...please someone help thank …

Member Avatar
Member Avatar
+1 forum 12

Hi, I completed my Advanced Java with JDBC,Servlet and JSP. I write one simple web application for online shopping using jdbc,servlets,beans and jsp. I installed Sun Java™ System Application Server Platform Edition 8 on my windows XP system. Now, my questios are like 1) where to put my index.html to start web application? 2) How to put JSP files and where? 3) What about Servlets, and where to put? 4) Where to put bean class? 4) I am using Ms-Acess as database Application? Thank you. Shashvat

Member Avatar
+0 forum 0

Hi everyone.I'm basically new to java but with the help of this forum i have managed to come up with the folowing code(see attachment).I'm a bit stuck now and i need help. PROBLEM STATEMENT When the login button(submit) is clicked i want the program to connect to a db(which i have already acomplished),and after authentication i want it to dispose the full screen frame,set timerframe visible and launch the count down timer.when the counter reaches zero,the timerframe must dispose and the the full screen frame set visible. i'm using the j2sdk1.4.2_04 version. P.s Feel free to alter or add anything …

Member Avatar
+0 forum 0

hi everyone.Can anione please tell me how can i create an action listener on a button in a java application.I know how to create one on an applet but somehow cant seem to do like wise on an application.Please help!.. :o

Member Avatar
Member Avatar
+0 forum 1

When I tried to set fullscreen in my applet I got trouble with the sandbox. But it only said [B]exclusive[/B] fullscreen mode is not allowed. So if I dont want to sign my applet, is there any way to get another fullscreen mode? I dont know what the other modes are, but Im quite sure there are some.

Member Avatar
+0 forum 0

hi everyone. I have a user interface with a login button(see attachment), The problem i'm having is: 1. When the login button is clicked, i want the frame to dispose.and another frame(timerframe) to be visible. 2.The login button has an actionlistener within it. 3.The login button also connects to a database. 4.Is a listener class a private or public class?- I'm having problem calling other external variables(components). Please help!!

Member Avatar
+0 forum 0

I wrote this program, however I can't seem to get it to read a string of numbers. Right now it inputs the numbers as single digits and also counts the white spaces. I thought that StringTokenizer would work, but I can't get it to. It compiles, but then errors out. Can someone Please help me out here. [code] import java.text.*; import java.io.*; import java.util.*; public class GradeCount { /** * The main program for the GradeSum class * * @param args -- not used */ public static void main(String[] args) throws FileNotFoundException, IOException { int count; // total number of …

Member Avatar
Member Avatar
+1 forum 3

Hello everyone. i'm new to the java world and i'm strugling to understand internal frames. I want to add a frame on top of another frame, and everything i try cant seem to work.Any help on this matter will be greatly appreciated. :?:

Member Avatar
Member Avatar
+0 forum 1

Dear sir, This function converts a string to a numeric value. Provide two versions of this function overloading to return either a long or double value Here is the pseudo code for the FNVAL processing Validate the input string value If it contains any non numeric characters, then throw a CSResult Convert the string value and return either a long or a double result please how to write the overload functions same parameter(passing only string) and returtype either double and long. Thanks&regard Sridhar

Member Avatar
Member Avatar
+0 forum 1

can anyone help me with the code for a vending machine in java please im begging you guys i need in less than 24 hrs

Member Avatar
Member Avatar
+0 forum 2

Hi all I am currently doing a survey form which will automatically send the results to a specific email on the key of the submit button. I have tried writing out to a text file before but not to an email. Can anyone please help? Thanks a lot.

Member Avatar
Member Avatar
+0 forum 1

Hi all, I need to maintain a text file which contains only 10 lines. As a new line is added to the top - a line is removed from the bottom. So although the file is automatically updated regularly it will always contain only 10 lines. I know how to create a new text file but not how to add a line of text to the top or remove a line from the bottom. Any assistance would be great, Cheers Jeff

Member Avatar
Member Avatar
+0 forum 2

dear sir Hi, In text field I want to restrict No of character entered should be only 3 if fourth character entering in same TextFiled it should not allow. How to solve it ? Warm regards sunil

Member Avatar
Member Avatar
+0 forum 2

The End.