32,204 Topics
| |
Hi! I need [B]create a class[/B] to represent a "rock". When a rock object is created it should have print out a message to the console saying: "Rock 1 created". I should have a field that contains the rock's [B]weight[/B], methods to [I]set[/I] and [I]get[/I] the weight and method to … | |
Hey ! :) Below is my code for a about page ! i need to load a image instead of suing drawString to draw the image ! :icon_redface: what i need to do is to load a jpg and center it to screen ! can any1 help me to modify … | |
Hi gurus's :cool: I have got an actionListner in my code. The problem is that when I try to set my JLabel as true it does not work and does not show up in the GUI ? :@ [CODE]Button.addActionListener( new ActionListner(){ public void actionPerformed(ActionEvent e){ label.setVisible(true); myFunction() //here's some timeconsuming … | |
I am doing a project using Java swing in Netbeans and I am using their in-built GUI generator thing. I have created a socket in one frame and i need to use the same object in another frame. these frames are present in the same package but are different classes. … | |
I have to convert 2D into 2 of Diamonds. I can not use if statements. If the person enters 10C then it prints out 10 of clubs. I've contemplated trying taking the string length, taking the position end of the string and using the D,C,S,H in the switch statements But … | |
Hi Does anybody out there know of some open source projects that uses Java and would be happy to accept another developer? I am busy with a skills upgrade effort (not to mention that I am looking to build my Java knowledge). Right now I am learning design patterns and … | |
i'm anju soosan i need a topic for doing miniproject in java(web application) | |
hi am trying to code a program that uses a panel that has a functional calculator in it, and the calculator can be re-sized using a slider. here is my code please help me out import javax.swing.*; import javax.swing.event.*; import java.awt.*; import java.awt.event.*; public class CalcInSlider extends JPanel{ JSlider slider; … | |
am trying to make a menu with a frame en its not working. and how can i introduce multiple panels in the same frame? here is my code. import java.awt.*; import javax.awt.event.*; import javax.swing.*; public class FrameMenu extends Jframe{ private final Color colorValues[]={Color.YELLOW,Color.RED,Color.BLUE,Color.GREEN}; private final Color colorValues2[]={Color.GRAY,Color.CYAN,Color.MAGENTA,Color.WHITE}; private RadioButtonMenuItem colorItems[];//color … | |
Please help in doing a very small project (mini project) in Java/SQL. Your quick response is highly appreciated. Thanks Muhammed Asif | |
So basically I have this file that my program needs to open called "outfile.txt" and "fort.20.txt". In windows, I have the file located at the root of the C:\\ drive, and the program compiles perfectly. My program goes to the directory like this: [CODE] File textfile1 = new File("C:\\outfile.txt"); File … | |
digester is an open source apache framework to converstion XML -> java JDO. is it possible to use it vice versa. i mean can i use digester to convert java object into xml with the same configuration file. Thanks in advance | |
Hello, i am using the digester to parse my xml into objects. I am getting the following error. could anyone pleaee help me to solve the problem . java.lang.IllegalArgumentException: No bean specified at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:874) at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java:460) at org.apache.commons.digester.BeanPropertySetterRule.end(BeanPropertySetterRule.java:189) at org.apache.commons.digester.Digester.endElement(Digester.java:1332) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at … | |
hi i hv one public class admins in one java file and i hv another public class login in another java file both files are in same folder login. i want to use admins class in login class. How can i do it,,? >> extending cannot be possible because both … | |
am trying to make a menu with a frame en its not working. and how can i introduce multiple panels in the same frame? here is my code. [CODE]import java.awt.*; import javax.awt.event.*; import javax.swing.*; public class FrameMenu extends Jframe{ private final Color colorValues[]={Color.YELLOW,Color.RED,Color.BLUE,Color.GREEN}; private final Color colorValues2[]={Color.GRAY,Color.CYAN,Color.MAGENTA,Color.WHITE}; private RadioButtonMenuItem colorItems[];//color … | |
hi, i am trying to use modem to dial phone,i am able to do it but after some time i get tones like dtmf tones on the receiver phone,i am using javax.comm package for serial communication,i think some additional AT commands other than "ATA " is to be used but … | |
I'm already build this program but get error...anyone can check for me?..tq [CODE] public class Clock { private int hour; private int minute; private int second; public Clock (int hour, int minute, int second) { this.hour = hour; this.minute = minute; this.second = second; } public Clock (Int hour, int … | |
hi,i m getting the following excption,though i hv properly set the classpath ,,, i m able to rum other programs,,,, plz help,,, [CODE] Exception in thread "main" java.lang.NoClassDefFoundError: admins (wrong name: a dmins/admins) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) at java.lang.ClassLoader.defineClass(ClassLoader.java:616) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 1) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at … | |
[CODE]How to use dos command in java program , i want to build new java explorer for my existing window because the look and feel of java is tremendous...[/CODE] | |
Would Java be able to .rename() a file while it is still being written, or will it detect that the file is in use? Also, is it possible to open a file for exclusive access in Java, and will this fail if the file is still being written? Thanks. | |
I have two ArrayLists that each contain a list of unique String objects.I am trying to count the number of words that are common between both lists, [B]E.G [/B] have one list that contains the words,("house", "cat", "broom", "car", "chair"), and 2nd list have ,("house", "cat") i want the output … | |
hello can you help me how i can catch the exception... I want to input integer for my array and i want to catch the exception if i will input a string this will display Invalid input how can i use this in try catch because i am confuse please … | |
So basically, I have this GUI program. I can run it, and it displays a graph of some data. The thing is, I want to put this program inside of JFramebuilder, and make changes to it. I dont know if it is even possible, but I figured if I opened … | |
I am working my way through an online book--Intro to Java Programming by David Eck--and in it he says that it is generally considered bad style to use the getGraphics() method to draw outside of a component's paintComponent method. Does anyone know why this is? | |
Hi, I had to wipe a computer and reinstall the operating system and eclipse. i had backed up two of my projects in my working folder for eclipse. i copied those project folder into my new working eclipse folder, but i can't seem to open them. Open project is grayed … | |
Hi All, I was trying to implement highlighter in my search engine. I was able to implement the highlighter but the problem is it does not always work. Sometimes it highlight and sometimes it doesnt though lucene returns the file where the term was found. I can manually see the … | |
Hi, I wonder how can access to a static method of a class called width from another object that has an attribute called width too: ex: [CODE] public class width{ private int test; public static int testValue(){ return this.test; } } public class Rect{ private int width; private int height; … | |
Hi, I am looking for an infrastructure like JCE in java so I can “install” encryption providers. The one I am going to put in now is Bouncy Castle provider and use “PBEWITHMD5AND256BITAES-CBC-OPENSSL” but I want to be able to change the providers and algorithms just by configuration change. I … | |
Hello, Say I have an abstract class Connection to represent some kind of connection that can be executed and then return some kind of result. My problem is that the result returned by each connection varies (String, byte[], some other class, etc...). This results in additional logic that seems like … |
The End.