132,729 Archived Topics
Remove Filter ![]() | |
I have no idea whats wrong here, i am fairly new to java.. heres my code.... [CODE] private JPanel pnlLogin, pnlFinalLogin,pnlUser, pnlPass = new JPanel(new BorderLayout()); btnLogin = new JButton("Login"); lblUser = new JLabel("Username:"); lblPass = new JLabel("Password:"); pnlUser.add(lblUser, BorderLayout.WEST); //pnlUser.add(txtUser); pnlPass.add(lblPass, BorderLayout.WEST); //pnlPass.add(txtPass); pnlLogin.add(pnlUser, BorderLayout.WEST); pnlLogin.add(pnlPass, BorderLayout.CENTER); pnlLogin.add(btnLogin, BorderLayout.EAST); … | |
i'm newby to C++. Small code as follows: [code] int main(int argc, char* argv[]) { cout << "function main() .." << '\n'; char ch1; int int1; cin >> ch1; cin >> int1; cout << ch1 << '\n'; cout << int1 << '\n'; return 0; } [/code] when i run the … Software Development c++ | |
I have an excel spreadsheet that has 2 used columns. Using Python I have to read the data in those to columns. So far I have a code that lists the item in column A and B on Python GUI. Once that is done I have to write code so … Software Development gui microsoft-office python | |
Hi I have a double *ptr which I use as an array. I am trying to send the address of the ptr to another sub processor. But I can only send 32 bits to the other processor.So its giving me an error makes pointer of type integer without a cast. … Software Development c | |
Hi, I'm trying to write a program that will continuously pull up a text file, search it for anything new, and create/change a different text file if there are ever any differences in the "myfile.txt" that is being constantly searched. The problem is, when I run my code, it consumes … Software Development c | |
If a user enters [CODE]0 0 0 0 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 0[/CODE] how do I read it in as [CODE] 00000000111010000000011111100000[/CODE] Software Development c | |
I have an eclipse application from which i trigger an Swing widget.On click of a button on the SWT composite a window pops out which contains the Swing Table. Now i want a button on this Swing page to show up an eclipse workbench window. Any idea on how I … Software Development ide java java-swing | |
been doing reiew questions to prepare for a c++ test, and was hoping someone could help me out by looking over the ansewers i have so far. what i have is in red. thank you very much :) -- Which of the following operations has the highest precedence? a. Postincrement. … Software Development c c# c++ data-structure | |
Hello, I'm new to programming forums so go easy on me :) I'm working on an assignment for school. I have to read a quiz.dat file which cotains info in the format of: TTTTTFFFFFTTTTT TTTTTFFFFF TTTTJoe Jones TTTTTFFFFFT TTFMary Jane ... ... etc. The first line being the answer key … | |
Can someone please tell me why I might be getting a access violation when doing the following for a double linked list: [CODE=C++] ~DLList() { while(!isEmpty()) //isEmpty is working.. removeHead(); } bool isEmpty() { if(head == NULL && tail == NULL) return true; else return false; } char * removeHead() … Software Development c++ linked-list | |
When I try to run my WordSort class with another class using the code: WordSort ws = new WordSort(sentence); ws.sort(); The program prints out what I want it to in the first method but for the ws.sort() method, the program prints out null. I would like it to print out … Software Development java | |
got some noob c++ questions that hope someone can help me with ---The statement while ( --counter >= 1 ) counter % 2 ? cout << "A" : cout << "B"; cannot be rewritten as: a. while ( --counter >= 1 ) if ( counter % 2 ) cout << … | |
hi there I want to create paragraphs or in other words I want to separate lines whenever I want. for example: car name: bla bla car license plate: bla bla . . . how can use that property of richtextbox in my rezervation program. I have searched through the web … Software Development visual-basic | |
so i am working on a program that gets input from the user for a triangle and should not take a negative number and display to the user that it is invalid. then needs to input the correct number. the problem is that my try and catch is not display. … Software Development | |
ok so i am trying to do a little phone book. i have a class that has information on the individual, the main would read from a file of individuals and ask if the user wants to add or remove , and the last one is array of individuals..here is … Software Development | |
So guys for the sake of simplicity lets say i am developing a huge matrix multiplication program using C and i made a data structure which is able to represent this huge matrix into miniature blocks the down side is that this representation of block takes much more memory than … Software Development c data-structure matrix-multiplication | |
Hi guys, uve been workin on a restaurant program and im tryin to write the time to the end of the receipt. so im writing information to a file. only problem is i cannot make my time function return the current time. I've tried everything. can you guys help?? im … Software Development c++ | |
I'm making a game as my project in school. I'm having a problem regarding double buffering, im trying to draw an image (drawImage(,,,,)) into the double buffered image, I can't seem to make it work help please =D [CODE] public void render() { if(doubleBufferImage==null){ doubleBufferImage = createImage(PANEL_WIDTH,PANEL_HEIGHT); // Set Size … Software Development java | |
was hoping someone with more experience could look over and tell me if these answers look alright. in red is what i got -- srand: a. Should be called before each call to rand. [COLOR="Red"]b. Should be used instead of rand to generate truly random numbers.[/COLOR] c. Is unnecessary in … Software Development c++ | |
[CODE] private void testFunc() { int[] arrayParam = new int[88]; arrayParam[2] = 67; calledFunc(arrayParam); Console.WriteLine("testFunc Done"); } private void calledFunc(int[] intArray) { Console.WriteLine(intArray[2]); //if new array declared, values not changed in testFunc intArray = new int[66]; intArray[2] = 33; intArray[5] = 55; } [/CODE] If calledFunc simply changes array values, … Software Development | |
hi, here is my code having return method that working correctly when i print it from inside of the method, but if i call from main method its shows only one output instead all results.. [CODE]public class SearchCompare{ .... public String process(){ String showResult=null; ... .. for (String found: names.keySet()) … Software Development java | |
To start off, I am absolutely sure this question has been answered before, but I've searched for it all over the internet to no avail, probably because I don't know the term. I've been working with Eclipse C++ IDE on my Ubuntu machine for awhile, and all of my programs … | |
please tell me where i'm off the window opens but no menu bar. the error says : java:52: '.class' expected menuInput[][] = array [row][col]; thanks hs [CODE] import java.awt.*; import java.awt.event.KeyEvent; import javax.swing.*; public class Driver{ public static void main(String[] args) { TheWindowObject aTestFrame = new TheWindowObject ("test"); } } … Software Development java java-swing | |
Sir, I am using the following code in my vb.net while using that code it will show me syntax error. [CODE]Private Sub updateinfo() Dim con As OleDbConnection Dim cmd As OleDbCommand Try con = New OleDbConnection(connectionString) cmd = New OleDbCommand("UPDATE [Lani] SET [First Name] = '" & txtfirst.Text & "', … Software Development vb.net | |
Will the new WPF 4 support multi-touch development on the HP TouchSmart computers? I know there is HP TouchSmart Developer kit, but it doesn't support the express editions of Visual Studio, and Visual Studio is kind of pricey. Software Development visual-studio | |
I am trying to read the matrix (please see this link [URL="http://www.clcbio.com/scienceimages/img8.png"]http://www.clcbio.com/scienceimages/img8.png[/URL]. This matrix will be in text based file. How can I read this file and create a matrix and fill it in my code. The other question I have is that the matrix has first row and column … Software Development vb.net | |
Hi, I have an IIF function in my textbox expression.This is my code. IIF(IsNothing(Fields!Duration.Value) , "Not released ",Int((Fields!Duration.Value/12)).ToString()+ "Y " +(Int(Fields!Duration.Value) Mod 12).ToString() + "M") But when Duration is null the true expression doesnt work instead it displays "#error".Can anyone help me to fix this? Thanx in Advance | |
I posted a snippet about using a microcontroller as a mouse, and it works great, but it moves the mouse as a stepper motion. How would I go about making it velocity driven? Like when I tilt the accelerometer further, the faster the mouse moves. I've seen it on youtube, … Software Development python | |
I have an int that I need to store as two chars. So is there some way to get the first 8 bits and the second 8 bits and store them as chars. And if so, how would I recombine them later to get a meaningful int value? Software Development c++ | |
hey guys, i have to do this program and i'm having trouble: Write a program that lets the user enter the loan amount and loan period in number of years and displays the monthly and total payments for each interest rate starting from 5% to 8%, with an increment of … Software Development java | |
I have a question for entering an atm number in a simulated atm. What happens is when i enter 1 to enter a pin number it fails on me three times. If I hit a 2 it does what it is supposed to. When I enter something other than a … Software Development c++ | |
When I try to compile this: [code=C++] //Player Class Definitions #include <iostream> #include "player.h" using namespace std; player::player() { health = 100; level = 1; potions = 10; enemiesDefeated = 0; } int player::attack(int *enemyHealth) { srand(time(NULL)); int randomNumber = rand() % 100; *enemyHealth = *enemyHealth - randomNumber; } int … Software Development c++ | |
I have the following code: tb_Job_No.Text is a combobox This is the code [code] Public Sub RepCD_process() ssql_Job = "SELECT * FROM Rep_Dist" ssql_Job = ssql_Job + " WHERE (Job_Number = '" & tb_Job_No.Text & "') " Dim Main_Form As New Main_Form With Main_Form .DC_Reps.Open() .DS_RepDist1.Clear() .DA_RepDist.SelectCommand.CommandText = ssql_Job .DA_RepDist.Fill(.DS_RepDist1) … | |
Hello, What I am trying to do is edit the variable of a class through a separate class function. I have tried to do things like [code=C++] int player::attack(int *enemy) { srand(time(NULL)); int randomNumber = rand() % 100; *consolePlayer.health = *consolePlayer.health - randomNumber; } [/code] and I get the error … Software Development c++ | |
hi below is code it is only a part of my program simplified for understanding the main problem i am facing .................... actually the code runs well but while exiting from main [B]displays Null pointer assignment[/B] . May i please request the forum member to debug the program..... the code … Software Development c++ | |
Hi I have newly installed VB 20008 Express. What extras do I need to have to allow me to create standalone exes? This for giving to fellow model railway club members and not for commercial use. Thanks Davy Software Development vb.net ![]() | |
delete this, solved, had to do with how a variable was declared Software Development java | |
I have three files: main.cpp [CODE]#include "CMain.h" int WINAPI WinMain(HINSTANCE hIn...) { return 0; }[/CODE] CMain.cpp [CODE]#include "CMain.h" using namespace Program; LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hwnd, msg, wParam, lParam); } return 0; } CMain::CMain(void) { … Software Development c++ | |
Hello, How can i change the root directory to the current working directory.. I need to use some form of an exec call to run a program found in the current working directory but the problem is that the path of that program is required to start with '/'.... my … Software Development c | |
Hello I'm creating a game engine. In order to draw everything correctly I need to sort a vector (vector<game_object*>) by each contents z value I miserably failed to do it with std's sort() so Id like to know what's the most efficient way I could sort this vector [If its … Software Development c++ | |
[URL="http://i41.tinypic.com/n2ef5k.jpg"]Screenshot.[/URL] Hello, I have a problem already for like a week and I seriously can't get out of it. Take a look at the screen shot. The server sends a packet to the client to spawn an NPC. If you look to the top commandline-window, the client does recv the … Software Development c++ client-server gui | |
So I have the following implementation of linked list: [CODE=c] #ifndef LINKED_LIST #define LINKED_LIST struct Student { char* name; char* surrname; char* signin_number; char* grade; char* date; struct Student* next; }; struct Student* begin = NULL; void push_back(struct Student* student) { struct Student* temp = NULL; if(begin == NULL) { … Software Development c linked-list | |
I want to know what is "Vector for the buckets in hash table". I gathered data and stored into hash table. And I want to know how to convert hash table buckets into Vector. If you guys have source, It would be helpful or theory, also welcomed. Thanks you in … Software Development c++ | |
I just wrote my first program using methods (I am only on chapter 5). I am not sure where I would use javadocs other than the ones that I already have in my code. Can someone help me? [code]/** * @author Brock Shelton * Date: March 15, 2010 * purpose: … Software Development java java-swing | |
Hello everyone :) My problem is that my input will not be transfered when i build a new Object. To understand my problem i give you first the output: Welcome Hero! Show me your Attributes! Enter your Name: KIKI Enter your Strength: 50 Enter your Health: 60 Enter your Intelligence: … Software Development java | |
I'm having troubles understanding global variables in python. I am trying to keep track of when a function gets called and once it does I want it to be unavailable to the user. However for some reason its not working :\ [CODE] psycStat = False def main(): form = cgi.FieldStorage() … Software Development python | |
Hey I have a use for working with basic binary search trees but I cant seem to find good examples on the basic operations such as sorting, insert data, delete and search for data. Can someone give some basic examples? Thanks. Software Development c | |
#include <iostream> using namespace std; int main() { int list[12] = {8,1,11,4,2,9,10,5,3,12,6,7}; cout<<list; return 0; } I run the above code and get this: 0x22fef0Press any key to continue . . . Please help!!! New with C and new with Dev-C++ which my University wants us to use... Running from … Software Development c++ | |
ok so im doing a project for a class, no body but me is doing c++ for it, im the only one in my school that knows some of it, and heres what i have so far, havnt gotten into too much detail for it because i need to know … Software Development c++ |
The End.