hi john
Thanks for reply. New method of derived class works only when they are accessed with derived class object, however if we use base class object to store derived class object then we wont be able to use new methods.
My problem got solved. I was not taking into account that netbeans by default uses free design as layout manager. So i derived a class using JPanel, override its paintcomponent method. I changed layout...
User Profile
Collapse
-
how to draw graph in netbeans JFrame using data from program.
hello all,
i am using netbeans ide for development. I want to display a graph on screen. After some search on google i found that we can create a graph by following steps:
1. extending a class with JPanel and overriding its paintcomponent( ) method.
2. now create a panel using palette and open its properties.
3. in property window go to code section and write new derivedclassnam e() in Custom creation code.
... -
To reboot:
1) reboot
2) reboot -f
Second command will immediately restart your system.Leave a comment:
-
Problem in mouselistener and windowllistener event handling
hello all,
Just for learning purpose I am making a gui in which wherever a user click on window a text " mouse clicked" will appear at current position of mouse pointer.
I have used listener interfaces.
Code:import java.awt.*; import java.awt.event.*; import java.applet.*; public class MouseEvents extends Frame implements MouseListener,WindowListener{
-
hello,
I have slightly modified given code. When I am using T[i] +j to display address, i am getting correct addresses of array T in output.
But when I am using T + i*MAXCOL +j (mathematically this is correct), I am getting incorrect answer. In the output instead of getting 4 bytes increment one by one to base address I am seeing 8 bytes increment.
Can anyone explain why it is acting differently?
...Leave a comment:
-
hi,
Yes Donbock is right, this algorithm might not be useful in case of negative numbers. As long as we are dealing with speed and time algorithm works fine.
Vipin SharmaLeave a comment:
-
hi
You can user floor and ceil funtion in c++.
If decimal part of your number is greater than or equal to 0.5 you can use ceil function and if decimal part is lesser than 0.5 you can use floor function.
To know the decimal part pass the double value to an integer variable and then subtract that integer value from double value. After that use if else statements to choose floor or ceil function.
You...Leave a comment:
-
Hello,
please explain parameter passin- call by name- with the help of an example, -
Hi markus
The loop will run three times only when proper looping condtion is given. e.g.
Code:amount =0; while(amount<3) { amount +=1; }
Leave a comment:
-
hi
you have to make your while loop run three times. but here you are checking amount less than 3 which should be changed.
vipin sharmaLeave a comment:
-
hi
Code:****spoonfeeding removed****** Describe your solution but just don't code it up. ---weaknessforcats
Vipin SharmaLeave a comment:
-
hi,
the line <std::getline(s td::cin, message);> doesnt wait for user input because you might have used both formatted and unformatted input in your program.
for e.gCode:int a; std::string message = ""; std::cout<<"enter value of a"; std::cin>>a; // newline character remains in input stream while(message.empty()) { std::cout
Leave a comment:
-
Two corrections u need to do :
1. char index = 0; // you have to initialise index to 0;
2. getchar(); // Put this line anywhere in your isr function before "if(RI==1)" .
Reason for correction 2 is given by zeeshan708. You might be entering some data in your function before calling isr function, therefore you need to nullify effect of last pressed enter key.Leave a comment:
-
After studying little bit of assembly programming in microprocessor I feel that i++ and i+1 differs in the way they are computed at register level.
i++ requires just one register of cpu which stores value of i, and it increments that register.
its assembly code: INC I;
but in case of i+1 it requires two registers one to store i and other to store 1.
its assembly code: ADD I,1;
As far as speed...Leave a comment:
-
write txtfirst.Text, txtsecond.Text in string.Format() ;
Reason for you error is that txtfirst is a text box not the text in that textbox....Leave a comment:
-
To convert a string to any number format you have to use Parse() function.
Following lines will make use of parse clear:
string[] str = { "1.23", "0.45", "123.4322" };
float[] flt = new float[str.Length];
for (int i = 0; i < str.Length; i++)
flt[i] = float.Parse(str[i]);
str[] is string array which contains your data. Now,...Leave a comment:
-
Dell partners with ubuntu for its linux distribution. You try to install ubuntu linux on your inspiron 6000. You can request Ubunutu installation cd (free of charge) or download ubuntu from url : https://shipit.ubuntu.com/
It would be better if can elaborate your problem in intalling linux.Leave a comment:
No activity results to display
Show More
Leave a comment: