32,204 Topics
| |
i made an audio application confernce using tcp it was good but the delay was not good i try to do it using udp but i found some problem like nat network and i can't use the same socket to send and receive in two threads tell me this socket … | |
1. a. Create a parent class "Vehicle" with one method "turnLeft" that prints "Vehicle turning left". b. Create a child class "Bike" which overrides the "turnLeft" method and prints "Bike turning left". c. Create a Vehicle reference referring to a Bike object. Is it legal? What happens when the "turnLeft" … | |
Hi,Im makin a web based application.For users to access it they need to login. I m using java,jsp,html for this.I wish to know how can i prevent access to the pages of application without logging in i.e. if user types in URL of some page of application in the address … | |
anybody online there, i want the solution of my problem.i will feel free to discuss the code of my aplication | |
I am trying to execute a exe file within' a jar file. My question: 1. How do I locate the exe within' the jar? I am using the [ICODE]runtime().exec()[/ICODE] to launch it. Right now I have to extract it then launch it, then after it's finished delete it. Thanks PO | |
Okay so I found some code online to create a simple chat server and I was trying to teach myself with it. I have a few questions though. First off here is the code: [B]ChatServer.java[/B] [CODE] import java.io.IOException; import java.net.InetAddress; import java.net.Socket; import java.net.ServerSocket; import java.net.UnknownHostException; import java.util.Scanner; public class … | |
I just inctance 5 JFrames with string drawed and its using 100% ...??? that add(panel); make the diference in CPU 5 or 100% I marked it in the comment in the code here's the code: [CODE]//import java.awt.event.WindowEvent; //import java.awt.event.WindowListener; import java.awt.*; //import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.event.*; import … | |
Is there something in Java that will perform the + or - operation? I need to compare a couple variables but the variables are not going to be exact, they'll be off by about +or- 2. | |
1.) I want to stream Live Audio, and i have chosen JMF to do it, i am an absolute beginner to JMF, so can anyone help me by providing me with some easy to understand Source codes of a Live audio/video program, so that i could go through it and … | |
Hello all, it's been a while since I've had a question, but I'm back. I'm trying to write a Vector class which can be any type. The problem I have is that generics can only hold objects, so when I try to say x+=vec.x it says that it cannot do … | |
Hi i am working swing based applet application which is deployed on a [B]jboss3.2.6[/B] webserver.the jar file [B]application.jar[/B] size is 140kb.i compressed the jar file using sun java pack200 technology as [B]application.pack200.gz[/B] file.now the jar file size is 46kb.the jar is deployed on application.war file with context-path [B]/application[/B] on the … | |
In my textArea the strings ' and " are passed to my Java method as unicodes. So instead of ' what i see is ’ What can i do to prevent this because it is also updated in the database as its unicode representetive. | |
Im working on a program that requires you to create an array with 10 elements, and asks the user to enter values for each array. Then, you need to copy the contents of the first array into another array, in reverse order. Can someone walk me through this one? Im … | |
Hello, I just discovered that we can use unicode anywhere in the program. EG :[CODE=java] public class CheckUnicode { public static void m\u0061in(String\u005B\u005D args) { System.out.println("Hello World!"); } } [/CODE] \u0061 = 'a' .. \u005B = '[' .. \u005D = ']' This program will execute fine without any errors. But … | |
Ok, I have to write a code snippet that prints out the value of 2 to the powers of 1 – 31 in a 10 character width, right-justified column. You may not use any literals or Math methods. Seeing as Im not allowed to use Math.pow, the only other option … | |
I need timer that is going to make pause in running of main thread. Like Thread.sleep() does,just I don't want to create Exceptions like this does. So I want to use Timer class. "java.util.Timer;" this one. I want to make class and to use her constructor where I need pause,like … | |
Hai friends, i want to invoke .net webservice([url]http://www.meizlik.com/Service.asmx[/url]) in java, how can i invoke, pass parameters to get result. please help me for this problem. | |
ok so have been assigned to make a 2 player tic tac toe game for my final project this year in school. However since this is a fisrt year java course we are using like "fake java" just to get the hang of it. Except now i have to work … | |
Hello People. I have set up my simple Java GUI to use a JTextPane. I need it to display the following 3 lines over and over again: [LIST=1] [*]A line with input from a variable (aligned left) [*]A line with output from a variable (right aligned) [*]A blank line [/LIST] … | |
I posted before but i had to repost to add the code thing. So heres the program. [CODE] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.awt.Color; import java.awt.Font; public class Testknowledge3 extends JPanel implements ActionListener { //Declare objects JButton Next; JButton Back; JLabel label; ImageIcon icon; JTextArea title; … | |
hi all , how are u? i have a question , i have a java project and i want to check if a fucntion is called or executed while the execution of the program ..how can i do this ?....thnx in advance... | |
Ok so im doing a project for school and i made an array to add up the scores. (the project is a learning module, (game)). So heres my code, i have declared everything in my main program (starting one) called science.java and my two other parts of the game (true … | |
if chat room members is 4 and each have mic the server receive the 4 packets and resend it in the same order here more delay in the client to run packet 1 and 2 ..... i want to merge the sound and send it to be in the real … | |
Hello people: I am trying to create a ComponentListener method that will resize some components when the window is resized. I have tried the following code, only to find out that it didnt work: [code] import java.awt.event.*; import java.awt.*; public class PowerEvent { PowerMath gui; PowerEvent(PowerMath in) { gui = … | |
how can I trigger anything outside the method ??? like carry the boolean a outside [CODE]public void windowClosing(WindowEvent arg0) { System.out.println("Window Closing"); a=true; // cant refer to non final variable a inside an inner class defined in a different method[/CODE] I want to use "a" in while loop for instance … | |
hi everyone Im working on a program that includes hash tables and files. What i'm doing is that I save the information (Name, Student ID, Address, Phone No.) of some students in a text file. I use a hash table to work on the students' information. Things like showing the … | |
Hi, I have java code, in the code there is about 5 lines that I wont to open in new Thread, I don't wont to crate all new class for 5 lines , can I can I implement the Thread inside the method without new class? | |
Hi I am writing a java program for a mobile database that should input from the user three entries (manufacturer, Model and Rating) save this in an array and file and be able to search from the data i the file and print on screen. I have written it but … | |
Hello, can you PLEASE put a SIMPLE traceroute code in java. i googled traceroute but i got a bunch of compicated codes. im new in networking programming, i want to implement the traceroute command . i already managed to create a network and wrote a program for the laptops to … | |
Hi everyone, I am trying to set my own calendar in JAVA. What I mean is, unlike the default Calendar I want to construct my own Calendar where a day will be only 13 hours for example instead of the 24 and there will be 30 days in every month. … |
The End.