31,001 Topics

Member Avatar for
Member Avatar for javaprog200

Hello, The following program displays two images (ImageIcon type) inside the JTextArea. Is there a way I can make both of these images transparent sothat what I type on them is visible? Thanks in advance! import javax.swing.*; import java.awt.event.*; import java.awt.*; import java.awt.image.BufferedImage; import java.io.File; import javax.imageio.ImageIO; import java.io.IOException; public …

Member Avatar for JamesCherrill
0
202
Member Avatar for fo2sh

Any body can help me with this error I am getting this error: C:\Documents and Settings\Fuad Damra\Desktop\TCPDayTimeServer.java:33: variable out might not have been initialized out.println("Server Sent Average: "+Avg); ^ 1 error When I am trying to execute this program: [CODE]import java.io.*; import java.net.*; import java.util.Date; public class TCPDayTimeServer { public …

Member Avatar for NormR1
0
905
Member Avatar for zuzzles

So i came across this issue that I can run my applet fine and it creates my file (exe) until i attempt to do so in a browser (firefox, IE, etc). Its signed and asks for permission and gives no erros but it doesnt write to the file I want …

Member Avatar for JamesCherrill
0
310
Member Avatar for sweets

Hello folks,I have implemented steganography for Least Significant Bit(LSB) 2 bit which works for any kind of carrier files i.e,basically i can hide image/text/video in any of these files. 1)Now i need to do some improvement for the project i.e, implementing steganography using any other method which is more efficient …

Member Avatar for sweets
0
121
Member Avatar for sweets

import java.io.*; import java.nio.ByteBuffer; import java.util.zip.*; import javax.crypto.*; import javax.crypto.spec.*; import javax.swing.*; import javax.swing.event.*; import java.awt.*; import java.awt.event.*; public class Steganograph { public static final byte[] VERSION_BYTE= {'2','0','0'}; public static final int OFFSET_JPG= 3; public static final int OFFSET_PNG= 42; public static final int OFFSET_GIF_BMP_TIF= 32; public static final short …

0
124
Member Avatar for blackmagic01021

Hello, I have a observer pattern based JTable. With time it is poulated with new data packets. I use addRow functionalities to add my rows. But I want to put always the last coming datapackets at the top. How to do it??

0
127
Member Avatar for design92

Hi all, I am trying to figure out javascript for mobile / home validation. Just to let you know, it must be equal to 11 digits (already done it) and accept only NUMERICAL characters, so letters are not accepted once validated or when you input data. My issue: I don't …

Member Avatar for stbuchok
0
180
Member Avatar for chinee

i am doing a project with a group i have to deal with orders by kind then linked to the driver who will be taking the first customer. the driver can be free or back in 10 min. i have started with the order list with the customer, i have …

Member Avatar for NormR1
0
762
Member Avatar for laura23

I have two files Persons.txt and Hobby.txt.In the third file i want to put all the persons names and add each name some hobbies.This is how my files look like Persons.txt ID;NUME;PRENUME;DATA_NASTERII;PROFESIA 1;Stan;Ilie;22-01-1977;profesor; 2;Becali;GG;01-07-1965;patron; 3;Tanase;Cristian;07-12-1988;fotbalist; 4;Pop;Ion;21-03-1984;pictor; 5;Popescu;Rodica;17-04-1986;sculptor; Hobby.txt ID;NUME;DESCRIERE;NUMAR_MINIM_PERSOANE;ELEMENT_NECESAR 1;baschet;sport in care se arunca mingea la cos;6;minge 2;fotbal;sport in care …

Member Avatar for NormR1
0
199
Member Avatar for vedro-compota

Hi) Guys , please tell me - which java graphic (which make you able to work with winforms) library should be studied at first? I started with SWT , but that i heared that it isn't "standart"...... thanks in advance for help.

Member Avatar for vedro-compota
0
202
Member Avatar for Andy90

Hi, I want to know what is main difference between Single Threaded and MultiThreaded Client-Server? I want to create a client server chat application. Server Form consist: 1 Textarea(text area) (to display text) 1 sendarea(text area) (to type the text to send) 1 Send button (to send the text which …

Member Avatar for JamesCherrill
0
171
Member Avatar for fonzi

Hello I am currently working on this code and the code can be runned well from 100-10,000 random elements after that the heap sort says stack over flow, im thinking the recursive calls are the cause of this, so please healp public static void MAX_HEAPIFY(int [] A, int i, int …

Member Avatar for JamesCherrill
0
307
Member Avatar for VeyRonX

Hi, This is the line: Class ourClass = new Class.forName("com.app.something"); And this is the the error: cannot find symbol class forName My IDE is Intellij Idea. This is a particular case, but i want to know what causes this type of error, what should i look for.

Member Avatar for JamesCherrill
0
610
Member Avatar for Stjerne

Hello, So I'm trying to make a simple register form in Java. I'm trying to code by myself to learn. I followed this tutorial: http://www.newthinktank.com/2012/03/java-video-tutorial-30/ My code seems to be fine, but when run the program, it doesn't look the way I wanted. Right now, this is how it looks: …

0
67
Member Avatar for Muhammad Anas

Here is a very simple segment of code. What I want is when I click on the button "First Button" then the window become empty. What actually happens is the window just becomes unresponsive. What could be the problem and what could be a solution?? import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import …

Member Avatar for Muhammad Anas
0
6K
Member Avatar for J.S.AlKatheeeri

Hi! I'm new, sorry if this is in the wrong place, mods please move this if necessary. Basically, I'm trying to give a breif definition of interfaces and abstract classes, please check if these are right: An interface defines what should be done not how it should be done. The …

Member Avatar for JamesCherrill
0
189
Member Avatar for bizak

Hello! I've been staring at my code for a while and I really have no idea where I'm going wrong. I'm working on deleting a specific node (for example, the integer 317)....but for some reason I just keep getting a nullpointer expression. I get the error when it goes into …

Member Avatar for JamesCherrill
0
287
Member Avatar for chinee

i have to create a graph for my project i found an example that was working and followed it first time with graph. i wrote my code got no errors but when i run the code this is what i am getting i don't understand it can some one help …

Member Avatar for emilo35
0
208
Member Avatar for polarbear125

I'm working on playing nim, where the person who takes the last object wins. My program is currently working, but it terminates after I only take one bunch of stones (You can take up to 3 at a time), no matter what the pile size is. Is there a way …

Member Avatar for NormR1
0
366
Member Avatar for empror9

hello, i'm leaning about ActionListener but i can't compile my code, i don't know why :( this is the code package javaapplication7; import java.applet.Applet; import java.awt.Button; import java.awt.Color; import java.awt.Label; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class Test extends Applet implements ActionListener{ Button b1=new Button("Red"); Button b2=new Button("Green"); Button b3=new Button("Blue"); …

Member Avatar for empror9
0
90
Member Avatar for gedas

Hi Guys, i need to create an application that would add or remove user accounts on a mac, also provide the users with the relevent premmisions. This has to be created in order to bulk create users or remove them so the apple provided interface would not be efficiant. Any …

Member Avatar for JamesCherrill
0
92
Member Avatar for triumphost

I have an application I'm updating from Java 6 to 7 inorder to get it to run. The code looks like: public Canvas(GraphicsConfiguration config) { this(); graphicsConfig = config; } But when compiled I get: "graphicsConfig is private access" @ line graphicsConfig = config. How can I do the same …

Member Avatar for NormR1
0
78
Member Avatar for crownedzero

I have a private ArrayList in a class and I'd like to be able to access it outside of this class, what would be the proper way to do this? Right now I've just made the ArrayList public but I would like to allow it to be private. Should I …

Member Avatar for NormR1
0
258
Member Avatar for irtihussain

package array1; import javax.swing.*; import java.util.Random; class pickrand{ Random rand = new Random(); public static String get(String[] array){ int rnd = rand.nextInt(array.length); return array[rnd]; } } /*********************************************************************/ public class Array1 { public static void main(String[] args) { int size = 10; String[] passcheck = new String[size]; String[] pass = {"abc345", …

Member Avatar for irtihussain
0
1K
Member Avatar for macdunk11

I need to make an Evil Hangman game for my Java class. Can anyone help please? I really need help figuring out how to put the words into "families". Also, if you see any problems with my code or any ways that I can make the code simpler, please let …

Member Avatar for macdunk11
0
478
Member Avatar for kalcio

hi, I prepare for an application to monitor network with the SNMP protocol,I have searched for APIs to help me in developping the code with java language like SNMP4j,but I'am just confused,is this API let me develop a class for searching the MIB values of the agent and thanks.

0
77
Member Avatar for nagatron

Hello to all java programmers, I have a problem about method and array. The program will display the second highest value of the inputed set of numbers in the main method. The problem is that it won't accept less than four inputs which mean it is necessary to put 4 …

Member Avatar for nagatron
0
246
Member Avatar for sonicx2218

import java.util.*; import java.io.IOException; import java.util.Scanner; import java.util.Random; public class LinkedListProgram { public static void main(String[] args) throws IOException { int i,number, ran; Scanner sc = new Scanner(System.in); LinkedList<Integer> list = new LinkedList<Integer>(); ListIterator li; String line; Random random = new Random(); int pick = random.nextInt(150); System.out.println("Enter # of nodes"); …

Member Avatar for sonicx2218
0
3K
Member Avatar for crownedzero

I'm using a loop to get user input and compare it; Idk why but on the first iteration of the while it works fine and displays only once. Second run thru I get two prompts, hoping someone can point out where I'm screwing up. public static void main(String[] args) { …

Member Avatar for NormR1
0
204
Member Avatar for devninja

I need to make a program that runs two threads. One that outputs ping and sleeps for ten second and one that outputs pong and sleeps for ten seconds. Everything works except instead of sleeping for ten seconds everytime the thread is ran its just jumps to the second thread …

Member Avatar for NormR1
0
602

The End.