32,199 Topics
| |
The program which is executing in windows has occurred error in linux. The program is on the jframe which is designed by using swing controllers is executing with error free in windows but when i use to execute the same program in linux an error as [B]GroupLayout [/B]error is occurring. … | |
What is the difference between the following two interface. How does the term "abstract" used along with an interface makes it different?. [CODE] abstract interface Bendable { } interface Bendable { } [/CODE] | |
I have a class KeyCards.java that just sets up a panel (gui) with labels,combobox and text fields when the combobox is selected a class generates strings to send to a class public Class Progressions extends KeyCards and puts the strings in setters. once all the strings are there it calls … | |
Hi, I'm a freshman and I just started programing. I have an assignment due soon, and it's almost finished. My only problem is there is one build error that tells me ".class expected". This is on the same line as a for statement... and that really confuses me. Here's my … | |
Does anyone know where I can find information about writing a java application for a file dump utility, a java program that will read a file and display the contents of the file in a byte by byte format? I am lost on this one. | |
Hey everyone~! I am having a major issue understanding class casting. I thought I understood it, but I found 2 problems in my Barron's book that seem to contradict in their explanations. Can someone please explain the distinction between these two problems??? [B][U]Problem 1:[/U][/B] [INDENT] Bird = Super class Owl … | |
Hello , am new here and i need some help in finding prime numbers.....I actually wrote this code below and it compiles but it repeats sequence with some numbers or most, plus if you run it you will see that the prime numbers are printed as prime numbers only but … | |
java.awt.image.DataBufferByte cannot be cast to java.awt.image.DataBufferInt.. how do resolve it... | |
To avoid malware infections, should I permanently disable Java and ActiveX in Internet Explorer? How about Javascript? If I should also disable Javascript, should I just disable Active scripting, or all options? But I don't also need to disable any of these in Windows itself, right? | |
Hello, i am just starting with Java and one of the programs is, to make a long story short, evaluate a computers power (pretend). you put in how many applications you want to run, what operating system and what power your computer is and it tells you whether you can … | |
Hello, I am studying for SCJP 6 Exam, and came across this question which shows code as asks for the output [CODE] 3. public class Ebb { 4. static int x = 7; 5. public static void main(String[] args) { 6. String s = ""; 7. for(int y = 0; … | |
Why is it that when I invoke the Derived constructor from the main method, I get a compilation error pointing to the Derived constructor of the Derived class. I never called the Base constructor of the Base class. Therefore why is the error happening?. [CODE] class Base { private Base() … | |
Hi, My assignment is to write static methods to give the following output: - Lists of all the sequences, all the perms, all the sets, and all the multisets with n=5 and k=3. -The [I]N Queens Problem[/I] considers how many ways n queens can be placed on an n by … | |
Hi all, I've got a main form, and a secondary form (this being a list from which I pick a number). I can store values as "global" variables - so as to bring the value across different classes. Also I've managed to get the main JFrame to display the value … | |
Hi, I have another question. What is the advantage of arraylist over vector. Why arraylist is widely used instead of vector in java programming? Thanks in advance..... | |
Hi i install openJDK on fedora 12 , after run eclipse this message shown : [QUOTE]JVM terminated. Exit code=-1 -Xms40m -Xmx256m -XX:MaxPermSize=256m -Djava.class.path=/home/mahdi/App/eclipse//plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -os linux -ws gtk -arch x86 -showsplash /home/mahdi/App/eclipse//plugins/org.eclipse.platform_3.3.201.v200909170800/splash.bmp -launcher /home/mahdi/App/eclipse/eclipse -name Eclipse --launcher.library /home/mahdi/App/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520/eclipse_1206.so -startup /home/mahdi/App/eclipse//plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -vm /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/../lib/i386/client/libjvm.so -vmargs -Xms40m -Xmx256m -XX:MaxPermSize=256m -Djava.class.path=/home/mahdi/App/eclipse//plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar[/QUOTE] please help me what … | |
I'm working on a Java program that is calling sqlcmd. It works perfectly on a computer with SQL server installed, but not at all on a computer that doesn't. I want to include the necessary exe and dll files to run this command in my jar. Anyone know which ones … | |
I need to create a JApplet containing a JLabel and a Jbutton. a JButton should automatically change font typeface, style and size when clicked. I have this coding so far : import javax.swing.*; import java.awt.*; import java.awt.event.*; public class JChangeFont extends JFrame implements ActionListener { JLabel name = new JLabel … | |
Hi friends, This is not java technical question. I am doing project java thats why i am posting here. I am doing project for SUMMARIZATION OF DOCUMENT. I finished 90 percent of my project. To test my project i need Data Set ( That means, Document with summarization ) . … | |
I am faced this Problem that I can't print display parent's content. Please help: [CODE] import javax.swing.JOptionPane; public class BinaryTree { private Node root; BinaryTree() { root = null; } //------------------------------------------------------------------ void buildTree() { String n=JOptionPane.showInputDialog("Root Information:\nEnter Name: "); int a=Integer.parseInt(JOptionPane.showInputDialog("Root Information:\nEnter Age of Root:")); String s=JOptionPane.showInputDialog("Root Information:\nAlive or Dead?"); … | |
i coding these line ... it is working fine.... but what i need is compress that [COLOR="Red"]Bufferedimage [/COLOR] before getting it as [COLOR="Green"]Raster[/COLOR] i tried jpeg compreesion but it return bytestream instead of int.. so i got exception "can't cast BufferdByte as BufferedInt"... [CODE] [COLOR="Red"]Bufferedimage [/COLOR]image=robot.createScreenCapture(new Rectangle(width, height)); ////here i … | |
I am attempting to stream accelerometer data from a Python script to a Java midlet via a socket connection on a Nokia N97, using the following code. Unfortunately, this code (which previously worked fine on a N95 8GB) doesn't seem to send any data to the midlet, and I have … | |
Hi, I'm writing a small program to simulate a projectile moving through air in a gravitational field. I have several classes for vectors, the gravitational field, and the projectile itsself. However, when constructing any of these objects in the main method, I get a "cannot find symbol" error, despite the … | |
Hey everyone. i am stuck with some work kindly help A.S.A.P!! Its for Java. Thanx!! 1. Write an application that reads an integer and determines and prints whether it is odd or even. Hint use the remainder operator 2. Write an application that reads two integers, determines whether the first … | |
Hi all, In my program I need to create 2 log files, success and error. But I need to create either one of them, depending on the out come of the program execution. In other words, if program fails for any reason, I need to create the error log file … | |
I'm trying to get a square on a checkerboard to become highlighted when the user clicks on the rectangle. I created all my squares using fillRectangle methods. I'm not sure how to begin implementing this in the mouse adapter. Only the border of the square needs to be highlighted. Would … | |
Hello! I am about to load details from a file and save it to a node. I am having an error regarding to a certain code. Here's the code:: [CODE]boolean loadFromFile(String filename) throws Exception{ boolean b = false; try{ FileInputStream myfile = new FileInputStream(filename); ObjectInputStream in = new ObjectInputStream(myfile); do{ … | |
HI, Can any one know how to convert byte array into char array. For example : byte buf[]=teststr.getBytes(); Note: buf is byte array. I need to convert this into char array. | |
Hi all, I have a java swing based client server application. The GUI is in swing and I am using glass fish as my server. Is there a way or any software available to create an environment where I can test my application by creating virtual user connections so that … | |
Hello I am learning Java at my spare time as a hobby. It only been a week and at the moment I am trying to get my head around the following things fields, constructor, accessors etc. There is an exercise which I ma having trouble with: [U]Human [/U] 1. Create … |
The End.