36,051 Topics

Member Avatar for
Member Avatar for lmthuan

Hi all, I have an input text file with content bellow : ------------------------ ABC = Any Body Cus JS = Java Script Ser = Serverlet Ars = Arsenal Any Body Cus = Any Body Cus Java Script = Java Script Serverlet = Serverlet Arsenal = Arsenal ------------------------ so i want …

Member Avatar for stultuske
0
222
Member Avatar for annette_arpana3

import java.util.*; import java.net.*; import java.awt.*; import javax.swing.*; import javax.swing.border.*; import javax.swing.plaf.*; import java.awt.event.*; import java.io.*; import snmp.*; public class SNMPInquisitor extends JFrame implements ActionListener, Runnable { JButton getDataButton, getTreewalkDataButton, getTableButton, getNextButton, setValueButton; JButton clearButton; JTextArea messagesArea; JScrollPane messagesScroll; JTextField hostIDField, communityField, OIDField, valueField; JLabel authorLabel, hostIDLabel, communityLabel, OIDLabel, valueLabel; …

Member Avatar for JamesCherrill
0
241
Member Avatar for Arturo32

Hi everyone, Im new to web programming and i need some help, I have something like this: <td><label>User (Login): </label></td> <td><input class="textbox" autofocus="true" type="text" maxLength="7" name="cUser" id="cUser" /></td> </tr><tr></tr> <td><label>First Name: </label></td> <td><input class="textbox" type="text" maxLength="20" name="cFname" id='cFname' value=""/></td> </tr><tr></tr><tr> <td><label>Last Name: </label></td> <td><input class="textbox" type="text" maxLength="30" name="cLName" id="cLName" /></td> …

Member Avatar for firdaus_lazim
0
770
Member Avatar for mydreamgirl

I installed Apache Tomcat 7.0.28 in my JBuilder6. I use JDK 1.6.0_32 (jre6). I can get http://localhost:8080/ page. However, when I tried to run my JSP file, I encountered following error: FileUpload.jsp: java.lang.NoClassDefFoundError: org/apache/tools/ant/Task FileUpload.jsp: Caused by java.lang.NoClassDefFoundError: org.apache.tools.ant.Task ...12 more Could not find the main class: org.apache.jasper.jspC. Program will …

Member Avatar for firdaus_lazim
0
397
Member Avatar for gedas

Hey guys, I am creating a simple java swing app that would allow me to monitor the activity on my sites. I am using google analytics api to do most of the monitoring(breif descritpion can be found here : https://developers.google.com/analytics/devguides/reporting/core/v2/gdataJava) however this does not show how to incorporate the new …

Member Avatar for gholtean
0
91
Member Avatar for writerervin

I apolagize if this question has been asked before, but I was looking to see how I would go about writing an editor that saves the file on a server instead of on the harddrive. I would appreciate any and all help.

Member Avatar for trishtren
0
171
Member Avatar for hkboateng

Hello Guys, I am writing an elevator problem and am stuck at the movement of the elevator and also stopping the elevator. The elevator is suppose to state the current floor is starting and the number of passengers that are in the elevator. I am able to let it go …

Member Avatar for hkboateng
0
581
Member Avatar for Verandaguy

[CODE]I'm currently redesigning my website in Dreamweaver CS5. My site was previously made in iWeb, which centered the page automatically in any browser at any resolution. When I preview my site in Safari using Dreamweaver, the whole page seems aligned left. Another issue (which I should probably also post in …

Member Avatar for Kratos-s-
0
314
Member Avatar for messynaddy

public class Stack extends LinkList{ public Stack(){ public void push (Object element) { insertAtFront (element); } public Object pop(){ return removeFromFront(); } public Object peek(){ return getFirst(); } } Im trying to create a movieApp using pop push and peek method(Stack). But once the class got compiled, it shows a …

Member Avatar for messynaddy
0
288
Member Avatar for karoke

CAN anyone help me in knowing the differences between J2EE, J2SE & J2ME... I am a newbie to Java. Please explain me in detail. Thankz in Advance !!!

Member Avatar for JamesCherrill
0
5K
Member Avatar for ubi_ct83

hi guys, i really need help on this problem. i have a code, but i need to convert it to algorithm.but i dont know how since im still new in this programming matter. hope u guys can help me please.... thanks for advance. public static void calculateTotalTupples(int p, int s, …

0
62
Member Avatar for mrgadgets

Do you people think slick2d is the best framework ever? I have tried it and now I am really enjoy using it to develop my next game in java.

0
90
Member Avatar for deshazer.jad

I'm trying to load a PNG file into a BufferedImage like so: BufferedImage image = ImageIO.read(new File("smile.png")); When I use this line of code alone, it produes the error: Unhandled Exception Type IOException... I can fix this by surrounding the statement with try/catch like so: BufferedImage image = null; try …

Member Avatar for deshazer.jad
0
854
Member Avatar for abbafan

I've got this thing that has kept me puzzling for a few days now. I've created an array of 30 integers, randomly chosen. I would like to add the integers randomly to a two-dimensional array of 12 x 12 integers. The remaining elements in the two-dimensional array should keep their …

Member Avatar for Rashakil Fol
0
229
Member Avatar for mrgadgets

I am looking forward to develop game in java and might sell it as well so here is the question: Do we need to pay fee to Oracle if we sell our game on the market or host it on our own web site with advertisement on the game page? …

Member Avatar for stultuske
0
246
Member Avatar for bipi09

i have this code in main.jsp <html> <head> <link rel="stylesheet" href="/bipi/css/bp.css" type="text/css" media="screen"/> </head> <body> <div class="navigator"> <a id="currenttab" href="/WEB-INF/jsp/main.jsp">Add</a> <a href="/bipi/display.jsp">Delete</a> <a id="currenttab" href="/WEB-INF/jsp/main.jsp">Main</a> </div> <%--<% String fname = request.getParameter("f_name"); String fage = request.getParameter("f_age"); if (fname != null && fage != null ) { com.test.gerrard.Insert(fname, fage); } %>--%> <form …

Member Avatar for anand01
0
985
Member Avatar for Valiantangel

hi my complier showing me that i am having 4 errors.In **t1.drawHexagon(int width)**; & **t1.drawPentagon( int width )**.Its says .class and ";" expected. Help. Thank you import java.util.*; import java.awt.*; public class Turtle extends SimpleTurtle { public Turtle (int x, int y, Picture picture) { super(x,y,picture); } public Turtle (int …

Member Avatar for corby
0
136
Member Avatar for Viped

Hi, I am trying to make simple gui which switches jpanel inside jframe but my IDE says "Cannot make static reference to non static method setPage(int) from the type Main". Why is that? There is no static modifier on actionPerformed or at setPage or actually anywhere else than public static …

Member Avatar for JamesCherrill
0
168
Member Avatar for sem123

Hello Friend I want to make SoftPhone in java as well as androied so please any help regarding it if you havae any website please link .

0
62
Member Avatar for viktor.baert

Hello, I'm trying to make a very basic + - calculator in java using constructors after watching thenewboston video tutorial I tried to experiment with it. My litle project is almost finished my only problem is that the boolean I use is being reset after I assign it. If someone …

Member Avatar for viktor.baert
0
939
Member Avatar for trishtren

Hey, I have a need to define a new type such as int,short etc. I have the class with all the base methods it must perform somewhat equivelant but different from the Integer class, Short class etc. However im not sure whether this is an interface i need to define. …

Member Avatar for sepp2k
0
135
Member Avatar for speakon

Hello! I am very new to Java and programming theory and desperately trying to improve my knowledge. This is the first program I've made without help and really would appreciate some feedback. I know there must be 1,000,000 better ways to do what I did. Notes: - Want to Move …

Member Avatar for speakon
0
1K
Member Avatar for iEpic

Im having a lot of trouble trying to figure out something that seems like it would be easy. For my final project I have to create a GUI application. I got it set up and working where when you click the button it will display some text depending on what …

Member Avatar for trishtren
0
171
Member Avatar for GlenRogers

Hi, this is part of an assignment question and probably something I should know. I have 2 classes. I have a method in one class that creates an instance of the other class and sets one of its attributes to a certain value. The class that has its attribute set …

Member Avatar for GlenRogers
0
292
Member Avatar for miaa

hi i am a 3rd year Bsc student and i have to do a project on "Text To Speech Conversion and Speech Recognition", as part of my college project, and i want to implement it as a mobile app..so plz help me with some suggestion..

Member Avatar for trishtren
0
117
Member Avatar for deshazer.jad

My application has a lot of buttons on it, and in order to create a skin for my application, I've been just creating a lot of images in my working directory and loading them all into my application as ImageIcons. I like working with ImageIcons, but not working with a …

Member Avatar for deshazer.jad
0
271
Member Avatar for sasikrishnasamy

hi, I am having doubt in peter_budo 's Mvc tutorial, in datbase design he has separate table for group mapping, Even we can add seperate feild (like group) in user table itself to acheive the same result, Is there any advantage in seperate that, Pls some one guide me. Sorry …

Member Avatar for pritaeas
0
162
Member Avatar for gosensgo87

**Hello i am a noob when it comes to java so sorry if its obvious but the code below is giving me a error when i try to compile it, the error is: Exception in thread "main" java.lang.Error: Unresolved compilation problem: at goodcalculator.main(goodcalculator.java:127). Can anyone help me? ** CODE: import …

Member Avatar for JamesCherrill
0
313
Member Avatar for skiabox

I want to bring to my desktop java application real-time data from three market indexes of the world (Japan, Frankfurt, and Nyse). I only need these three quotes. Is it an easy task?

Member Avatar for rfq
0
75
Member Avatar for brunoccs

"The method overriding is an example of runtime polymorphism. You can have a method in subclass overrides the method in its super classes with the same name and signature. Java virtual machine determines the proper method to call at the runtime, not at the compile time." Why not at compile …

Member Avatar for JamesCherrill
0
152
Member Avatar for godzab

I would like to keep on checking a JTextField until the field equals ten digits. When the JTextField equals ten digits then an event will happen. I want to do this without a button. Here is what i tried to do: JTextField get = new JTextField(10); String a; public className(String …

Member Avatar for softswing
0
592
Member Avatar for breakid

Hi, I want to implament a simple tcp client and server. but I want my clien do I need to init the socket before every time I'm sending message to the server ? This is my client: class TCPClient { public static void main(String argv[]) throws Exception { String sentence …

Member Avatar for JamesCherrill
0
150
Member Avatar for Raghu D

hi ! Actually the operation is as follows.when the user clicks the"search" button in t he jsp, the datas from mysql is sent to jsp page.If the user likes to print the datas,he has to click "print" button.Then the datas in the jsp page has to be sent to the …

Member Avatar for Ramkeeys
0
252
Member Avatar for rahul.ch

class Dog { public void bark() { System.out.println("Dog bark"); } } class Hound extends Dog { public void bark() { System.out.println("Hound bark"); } public void sniff() { System.out.println("Hound sniff"); } } public class CastingMethodCall { public static void main(String r[]) { ((Dog)new Hound()).bark(); //((Dog)new Hound()).sniff(); } } On executing above, …

Member Avatar for JamesCherrill
0
267
Member Avatar for rahul.ch

class Mixer { Mixer() {} Mixer(Mixer m) { m1 = m; } Mixer m1; public static void main(String args[]) { Mixer m2 = new Mixer(); Mixer m3 = new Mixer(m2); m3.go(); Mixer m4 = m3.m1; m4.go(); Mixer m5 = m2.m1; m5.go(); } void go() { System.out.println("hi"); } } The answer …

Member Avatar for sepp2k
0
262
Member Avatar for tandex

some people say that multiple inheritance in java is not needed because we have interfaces or that using singular inheritance can bring the same results as using a multiple inheritance. But that is not the case. Lets take a look at the example I call “The Workbench Example” say we …

Member Avatar for stultuske
0
413
Member Avatar for millroy

hi i have created a j2me application which uses gps but wen it wants to use gps it prompts out a message to comfire its usage over location services. now i want to know how to make location servies to be used my default by the cellphone. i know its …

Member Avatar for saisyam.dampuri
0
141
Member Avatar for staneja

I am very new to JSP language and i ahve worked a lot on JAVAlanguage and i have configured my Tomcat Server also and its running fire I would like to know about the steps that i am required to follow to Execute my JSP File. 1.Please tell me in …

Member Avatar for Gayanmdh
-4
4K
Member Avatar for skiabox

I have created a JFrame with two JPanes (mainPanel and secondPanel)in it. I am trying to update the first JPane (mainPanel) with a JPane that is returned by another class of the project. How can I do that? Thank you.

Member Avatar for skiabox
0
173
Member Avatar for GlenRogers

I have made 2 classes; Customer and Repair. I have a map<String, Customer>(customerDetails). Customer objects hold a map<String, Repair>(repairs). My GUI has 2 JTextAreas, notes and results. In notes ou type some notes and when you choose save the notes appear in results and a new Repair is created with …

Member Avatar for GlenRogers
0
136
Member Avatar for skiabox

I have created a JMenuItem and a JButton. How can I have the same result when I use either the JMenuItem or the JButton? Basically I want them to trigger the same method. Thank you.

Member Avatar for JamesCherrill
0
104
Member Avatar for skiabox

I have created a JToolBar and I added 3 JButtons inside it. Is there any way I can increase the horizontal space between the buttons?(Now they seem like they're stacked together) Thank you.

Member Avatar for skiabox
0
189
Member Avatar for skiabox

I have created a form and I added a JFileChooser on it. When I start the form , the JFileChooser appears when the form loads. I gave used netbeans fileChooser tutorial.(http://netbeans.org/kb/docs/java/gui-filechooser.html) Any ideas? Thank you.

Member Avatar for skiabox
0
185
Member Avatar for rahul.ch

public class Thread8 implements Runnable { Demo d; public static void main(String r[]) { new Thread8().disp(); } void disp() { d = new Demo(); new Thread(new Thread8()).start(); new Thread(new Thread8()).start(); } public void run() { d.fun(Thread.currentThread().getId()); } } class Demo { static long f=0; synchronized void fun(long id) { for(int …

Member Avatar for JamesCherrill
0
232
Member Avatar for macca84

Hi, im trying to query an oracle db set up of table is all done and filling it is fine but when i try to send a query to the db using a resultset to store the outcome im getting the error "cannot convert int to ResultSet" ive looked at …

Member Avatar for lain00
0
758
Member Avatar for JakeA

Hi, How do you disable the minimize button in a JFrame. I only want to disable the minimize button, not the close and maximize button. Please help me with this one. Thanks.

Member Avatar for DavidKroukamp
1
2K
Member Avatar for FALL3N

hey, so I know if I use the drawLine() method, then I could change the line stroke/thickness with setStroke, but how do I change the thickness of a Line2D?

Member Avatar for FALL3N
1
659
Member Avatar for hszforu

This is my code: //VariableArguments3.java public class VariableArguments3 { static void test(String s,int ...v) { System.out.println("length:"+v.length+" String:" +s); for(int x:v) System.out.println("x="+x); } static void test(String s,double ...d) { System.out.println("length:"+d.length+" String:" +s); for(double x:d) System.out.println("x="+x); } } and //VariableArguments3.java public class VariableArguments3Test { public static void main(String args[]) { VariableArguments3.test("harshal",33,43,34,23,24); VariableArguments3.test("hosha",43,442); …

Member Avatar for hszforu
0
167
Member Avatar for hszforu

This is my code: //VariableArguments1.java public class VariableArguments1 { static void test(int ...v) { System.out.println("length:"+v.length); for(int x:v) { System.out.println("x="+x); } } } and //VariableArguments1Test.java public class VariableArguments1Test { public static void main(String args[]) { test(33,43,34,23,24); test(43,442); test(); } } Following are the errors i am getting: VariableArguments1Test.java:5: cannot find symbol …

Member Avatar for hszforu
0
133
Member Avatar for libathos

Hi,I'm writing a Java/Android application which consumes web services(these web services are written in .Net) from a certain URL.My problem is that some web services return to my application objects which are defined in .NET.Is there anyway my application can manipulate those objects?

0
93

The End.