132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for LianaN

Hi! There is JPanel with multiple JLabel components. I would like to change the border color of JLabel component that is clicked on. I tried [ICODE]this.getComponentAt(e.getX(), e.getY()).setBorder(solidBorder)[/ICODE], but it did not work... How could I solve this task?

Software Development java
Member Avatar for LianaN
0
93
Member Avatar for Iamthecheese

Hello, I'm getting quite flustered with this program and the errors are starting to get harder to debug. This is my tree.java file: [CODE]package TreePkg; import java.io.FileNotFoundException; import java.lang.SecurityException; import java.util.Scanner; import java.util.NoSuchElementException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.Serializable; import java.io.EOFException; class TreeNode<T extends Comparable <T>> …

Member Avatar for JamesCherrill
0
230
Member Avatar for Xeros606

Why do they release their own version? Also why don't they allow Java on their portable devices? I'm looking for their specific reason, something besides "Apple are Nazis".

Software Development apple java
Member Avatar for masijade
0
106
Member Avatar for CrazyPixel

Hello. First of all, I'd like to say that this is my first post. I have indeed searched this forum for code snippets and help, but never thought I'd have to post anything, since I could easily search for someone who's had the same problem and fix my own code. …

Software Development c++ windows-vista
Member Avatar for jonsca
0
171
Member Avatar for LianaN

Hi! I'm trying to add dragging and dropping behaviour to JLabel. It works only when I press the mouse for the first time. If I continue pressing the mouse, the error message shown below is generated. Please, help me to find an error. [CODE] JLabel bkg = new JLabel(icon); jLayeredPane.add(bkg, …

Software Development java java-swing
Member Avatar for LianaN
0
427
Member Avatar for Akill10

Hey, I've never really used packages before so I was wondering if what I am doing is possible. i have a package called spacewars with all my classes. I then created another package from that called spacewars.resources. I am not sure what the best way to access those resources is. …

Software Development java
Member Avatar for ~s.o.s~
0
100
Member Avatar for MarounMaroun

Hello folks, How can I fill a 2D-array (of size [1260][4]) with all variations of 1-10 (which is 5040 variations)? 1 2 3 4 1 2 3 5 1 2 3 6 .. .. 1 7 4 9 .. and so on.. Thanks!

Software Development c++
Member Avatar for frogboy77
0
96
Member Avatar for localp

I need to code a C++ program to execute the tab control of the keyboard through the code. I am expecting when the tab control of the code gets executed, we should be able to navigate throught the web page through it. for example, take a web page, and we …

Software Development c c# c++
Member Avatar for localp
0
326
Member Avatar for cardinalxp

hello I have installed the fax service in windows. I want to write a code in vb.net program that start receiving from a fax call. please instruct me.

Software Development vb.net
Member Avatar for cardinalxp
0
82
Member Avatar for bookmark

Hi I have this code with a function that outputs a square filled with the given char but for the [CODE] square(4);[/CODE] I want it to just output a square like this [CODE] **** **** **** **** [/CODE] How would I do this without changing the function definition or using …

Software Development c++
Member Avatar for MasterGberry
0
127
Member Avatar for lochnessmonster

How would i read a files bytes into a buffer in my program to compare them with another string a bytes? what methods are possible that i have available using c++ standard and/or the windows api -thx

Software Development api c++ windows-api
Member Avatar for jonsca
0
84
Member Avatar for bookmark

Hi. This program has a function that divides an unsigned arg by another unsigned arg. I want it to only keep outputting "I'm really upset" after the first time it outputs "I'm really upset". Right now it outputs as [CODE] 5 0 I'm really upset 6 Press any key to …

Software Development c++
Member Avatar for jonsca
0
127
Member Avatar for x2fair

hi, i'm christopher. and sorry because my english is not good.i am creating a new program whch is Document Tracking System Integrated with Barcode which one of my project..my problem is I am new in vb 2008. I create a random numbers and I want it to be converted and …

Software Development vb.net
Member Avatar for x2fair
0
109
Member Avatar for sciprog1

Hello Members, I have a Class_A which extends a JPanel. This JPanel is inside of a JFrame. In Class_A, I have a series of images (stored in an ImageIcon array) and another image, let's call it Image_A, which is also a ImageIcon type. How do I make Image_A a background …

Software Development java
Member Avatar for sciprog1
0
183
Member Avatar for bookmark

Hi I'm trying to make a program that returns the number of letters in a string but it seems that the function I have is not working as it returns 0 every time. Can someone check what I'm doing wrong? Thanks in advanced. [CODE]#include<iostream> #include<string> using namespace std; unsigned letters(const …

Software Development c++
Member Avatar for bookmark
0
260
Member Avatar for dcarrawa

I have a question about embedding Perl scripts in C. I wrote most of the program in C and a portion of it in Perl. As of right now, to call the Perl script I'm using pipe(), fork() and dup2() to create another process and have the Perl application write …

Software Development c perl
Member Avatar for dcarrawa
0
254
Member Avatar for bookmark

Hi, I have this program that outputs a triangle when given the size. Right now the triangle outputs like this [CODE] 5 * ** *** **** ***** [/CODE] Does anyone know how I would make it look like this? [CODE] 5 1 12 123 1234 12345 [/CODE] Thanks in advanced …

Software Development c++
Member Avatar for bookmark
0
215
Member Avatar for murtazamzk

#include "Stdio.h" [CODE]main() { int a,b,c; int count = 1; for (b=c=10;a="- FIGURE?, UMKC,XYZHello Folks,\ TFy!QJu ROo TNn(ROo)SLq SLq ULo+\ UHs UJq TNn*RPn/QPbEWS_JSWQAIJO^\ NBELPeHBFHT}TnALVlBLOFAkHFOuFETp\ HCStHAUFAgcEAelclcn^r^r\\tZvYxXy\ T|S~Pn SPm SOn TNn ULo0ULo#ULo-W\ Hq!WFs XDt!" [b+++21]; ) for(; a-- > 64 ; ) putchar ( ++c=='Z' ? c = c/ 9:33^b&1); return 0; …

Software Development c
Member Avatar for Shankye
0
192
Member Avatar for steve_Student

Hi i have created a program for my college assignment which asks to create a program for a telephone company that requires the program to calculate call charges for their customers, and also give discount calls depending on the time of day and day of the week. The assignment also …

Software Development c++
Member Avatar for sakijr
0
202
Member Avatar for seanbp

These days, it's usually unnecessary to consider how much memory to allocate for a string input. This was mostly for fun. This code allocates memory as the user inputs each key stroke, then allocates and returns a string pointer when the user presses enter. Tell me what you think! [B]USAGE:[/B] …

Software Development c++
0
332
Member Avatar for Slyvr

I have a buying system set up in one class (the Right Panel class) and it's working great, but my text field for displaying money available is in the Left Panel class. When I click the buy button, it should subtract from the money amount and re-display the new money …

Software Development java
Member Avatar for seanbp
0
116
Member Avatar for Chillin2

Please help me..I need to fix my array. This is from my instructor..Your program compiled and ran well. It implemented all of the requirements for the assignment. You have a separate class that stores your Product, and your products are stored in arrays. You also implemented methods to sort the …

Software Development java
Member Avatar for Chillin2
0
106
Member Avatar for AndersSilva

Hi guys, I'm new to this forum and I have been studying Python for about 2 weeks. I know most of the beginners can solve all their doubts just by looking at the documentation, but even reading about these modules: time, datetime and threading, I wasn't able to solve one …

Software Development python
Member Avatar for richieking
0
155
Member Avatar for by_stander

Hey everyone, I have a Matlab code that parses data from a csv file, performs some calculations on the data, and spits it back out into a new csv file. the new csv file contains all the data from the original file, with the new calculations appended on at the …

Software Development c++ file-system
Member Avatar for jonsca
0
237
Member Avatar for LianaN

Hi! I would like to zoom in & zoom out an image in JLayeredPane. Now I have a snippet for loading a background image into JLayeredPane. How could I now access ALL content images of JLayeredPane (it could contain multiple images) and zoom them in/out? Perhaps, somebody could send me …

Software Development java
Member Avatar for LianaN
0
217
Member Avatar for sanjuanair

Frndz, I want to now how to start learning C/C++ programming in my pc. means there is a problem with installation of normal turbo c in my computer. it is not working. [COLOR="Green"]So what software i have to install? From where i can download it? Is there any C++ software …

Software Development c++ windows-vista
Member Avatar for seanbp
0
116
Member Avatar for johngalt10

I'm new to scripting. I'm trying to find out how to target my cout to a field in a gui. Any direction will be greatly appreciated.

Software Development c++ gui
Member Avatar for jonsca
0
100
Member Avatar for christos312

Ok this is very strange and i cannot see where is the problem and i guess is really easy but i cannot see it so i will need your help :-O My Declarations [CODE]int myGraph[4][4]; int vertices[4]; char path[4];[/CODE] My initialize code [CODE]for(int i=0; i<=4;i++) { for(int z=0; z<=4; z++) …

Software Development c++
Member Avatar for christos312
0
154
Member Avatar for mangopearapples

Why won't this work? I'm trying to make a ball appear and move along my screen but it's failing :'( . I'm :( and also trying to make it so when you press any key it restores the full screen but that's also failing. :'( Can anyone help? [CODE]import javax.swing.*; …

Software Development java java-swing
Member Avatar for mangopearapples
0
468
Member Avatar for cthoes

when i execute the below progam i am getting this errror [ICODE]type or namespace definition, or end-of-file expected in c#[/ICODE] [CODE] using System; class Program { public static void Main(string [ ] args){ string[] colorList =new string[10]; colorList[0] = "sunday"; colorList[1] = "monday"; colorList[2] = "tuesday"; colorList[3] = "wednesday"; colorList[4] …

Software Development c#
Member Avatar for james6754
0
3K
Member Avatar for yatman

I have a function below which is supposed to read from a continuous updating file...by another program. for this reason I used a fileptr int to keep track of the last known good read so this index value is updating correctly but it is not being used by getline. and …

Software Development c++ file-system ios
Member Avatar for vijayan121
0
160
Member Avatar for ColMatrix

Hello, I am new to Perl - and so far I am enjoying it. Unfortunately I do not have the luxury to start completely from scratch. I have here a problem that i am struggling to solve. I have spent [B]many[/B] hours trying to solve this issue without any success, …

Software Development perl
Member Avatar for d5e5
0
381
Member Avatar for Akill10

Hi, I'm a bit stumped. I'm trying to find out a way to make a bullet fly from a spaceship. So far, I managed to make it work but it attaches onto the coord's of my ship image(I used the position of this to map the starting position of my …

Software Development image java
Member Avatar for JamesCherrill
0
346
Member Avatar for masamune

Hello, I'm having little trouble solving this question correctly. first of all, I keep failing at testing most of these methods, and I don't know where did i go wrong for them not to work. thus, i'm not able to know if it's solved correctly or not. Question is: 1.CountNumbers …

Software Development file-system java
Member Avatar for JamesCherrill
0
230
Member Avatar for ajst

Hi guys, I'm trying to create a 2D array of JLabels my first problem is actually creating them. my code atm is = [CODE] package test; import java.io.File; import javax.swing.JLabel; import javax.swing.JPanel; public class testing extends javax.swing.JFrame { /** Creates new form testing */ public testing() { initComponents(); for(int i …

Software Development java java-swing
Member Avatar for ajst
0
1K
Member Avatar for J.Killa

I'm doing a java project where one of it's parts is to add college courses to an arraylist. This college courses has their class code like ccom 3001, how many credits does that class have and the complete name of the course, like Programming I etc. The only thing I …

Software Development java
Member Avatar for jon.kiparsky
0
174
Member Avatar for gaurav_13191

I have the following code for Quick Sort procedure: [CODE] #include<stdio.h> void Quick_sort(int *arr,int left,int right); int Partition(int *arr,int left,int right,int pivotindex); int main() { int a[20],n,ctr=0,j=0; printf("\nEnter number of elements:"); scanf("%d",&n); printf("Enter array elements:"); while(ctr<n) { scanf("%d ",&a[ctr]); ctr++; } Quick_sort(a,0,n-1); printf("\nSorted Array:"); while(j<n) { printf("%d ",a[j]); j++; } …

Software Development c
Member Avatar for vinitmittal2008
0
149
Member Avatar for prayag.419

hi friends, i want to make software in C#.net (new user of C#.net), on "Clothes shop for men". Can anyone suggest some help.

Software Development
Member Avatar for prayag.419
0
170
Member Avatar for helpfullProgram

Hello everyone! I am programming a vector which stores a name and a number. [code] typedef pair<int,string> Users_Pair; vector<Users_Pair> Users_Name; [/code] And the vector expands and contracts through out the life of the program. But when I use erase all elements above the one being erased loose their string? I …

Software Development c++
Member Avatar for Narue
0
199
Member Avatar for shinsengumi

Hello all. Can anyone here help me create a separate function for the socket() API in socket programming? I successfully created one in Linux before but so far I can't do the same in Windows. The Windows version can't successfully connect using the separate socket() function. My primary suspect is …

Software Development c microsoft socket-programming
Member Avatar for shinsengumi
0
481
Member Avatar for SacredFootball

Hey All. I'm needing a fully transparent label to rest over a picture field that gets resized from calculations. The picture field is simple a background image in a PictureBox that represents a percentage of a whole. The label stores the actual percentage text. Here's the issues I've come across: …

Software Development
Member Avatar for scavenger86
0
179
Member Avatar for angele18

Hi I have the following coding whereby I am trying to show Properties that have their price within the from and to drop down menus. However it only works well when the from price is set to 0. when I do price from 1000 to 800000, properties within that range …

Software Development
Member Avatar for Sergey.Smirnov
0
91
Member Avatar for SusanHAllen

Hello all, I have a windows application with a DataGridView. I have successfully bound the DataGridView to a datasource (datatable based on database query). I would like one of the columns to be a ComboBox that is selected to the correct datasource value, yet upon click displays data from a …

Software Development c c# c++ dataset
Member Avatar for SusanHAllen
0
1K
Member Avatar for rickster11

I'm trying to complete the good old Knight's tour (Knight piece must touch every square on board without touching a square twice. My code goes all the way to the point where the knight is at a dead end, and I need to revisit the last stack... How do you …

Software Development java
Member Avatar for pali185
0
956
Member Avatar for IDC_Sharp

so, i want to save my listView Items as i save Location or Size of window in the Project settings. for example: [CODE] private void Form1_Load(object sender, EventArgs e) { this.Location = Properties.Settings.Default.MyLoc; } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { Properties.Settings.Default.MyLoc = this.Location; }[/CODE] how can i do that? …

Software Development listview
Member Avatar for Diamonddrake
0
1K
Member Avatar for snehil_khanor

hi, php have thi svery nice function strtoime() int strtotime ( string $time [, int $now ] ) The function expects to be given a string containing an English date format and will try to parse that format into a Unix timestamp (the number of seconds since January 1 1970 …

Software Development c# php unix
Member Avatar for Sergey.Smirnov
0
773
Member Avatar for gaurav_13191

Consider the error in following program- [CODE] #include<stdio.h> #include<conio.h> #define MAX 100 struct stacktype { int stack[MAX]; int top; } ; void push(struct stacktype * s,int item) { if(s->top==MAX-1) { printf("Overflow"); return; } s->top++; s->stack[s->top]=item; } int pop(struct stacktype *s) { int item; if(s->top==-1) { printf("UnderFlow"); return -1; } item=s->stack[s->top]; …

Software Development c
Member Avatar for gaurav_13191
0
183
Member Avatar for frank33

I am formally studying VB.NET and the teacher has temporarily left us with a textbook to study. In a chapter on Arrays an example of actual code is given, as shown at the bottom here. We use Microsoft Visual Basic 2008 Express edition for our code. However a simple Copy&Paste …

Software Development vb.net visual-basic
Member Avatar for kvprajapati
0
242
Member Avatar for gladius33

Hellooo guys could any one help me pllz i have a final exam tmw :( and the exam is Write a program that read 5 integers numbers and print the largest and smallest numbers By using IF statements :(

Software Development java
Member Avatar for ajst
0
191
Member Avatar for networkZombie

...so I'm trying to make a program that takes in the three sides of a triangle and then decides whether the triangle is equilateral, isosceles or equilateral. I have to have 2 different functions and I can't use global variables ( That's what my teacher wants ). My main function …

Software Development c++
Member Avatar for Dingbats
0
273

The End.