Shyam Purkayastha

Ranch Hand
+ Follow
since Jan 15, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Shyam Purkayastha

Thank u all for the advice
Adding \n has really worked
however when i write
printf("Hello \n World");
only Hello is displayed
This thing is pretty werid and dosent happen in turbo c or any other windows based c compiler
Why is it so?
thanks a lot abain
shyam
20 years ago
Hi all
I have a silly problem and as i am new to linux programming i am quite baffeled
I have written a simple hello world program in c
,compiled with gcc and ran it.IT is not showing any errors in complation or run stage but the output "Hello World" is not displaying.
Does it has anything to do with I/O redirection or something else.Please advise
thanks
shyam
20 years ago
Hi guys
I have a problem related to the TitledBorder.When we draw a titled border in a component it takes some space inside the component.In my case it is messing up the painting of my custom component because the font size of the titledborder is quite big.
I want to know is it possible to reduce the size of the font of titledborder and how.
thanks
shyam
21 years ago
Well Thanks for that
However I have already checked that link earlier
Its good but what I am looking for is a complete example demonstrating the serialization technique as well as the externalizable interface.
Is there any such link on the net
thanks
21 years ago
Is there any good online tutorial on object serialization
thanks
21 years ago
Hi, Does anyone know if there's code available for clickable and draggable icons on a layered pane,
as I can't seem to get mine to work right.
Briefly, I want to click on and icon...that reigsters it for dragging.....it drags while I hold the
mouse down, then stops dragging when I release.
thanks
shyam
21 years ago
The problem was with the file extension
I had given .jpg but it should be .jpeg
21 years ago
Hi all
I was just trying to add and display an image on a Jwindow using the following code.
import javax.swing.*;
import java.awt.*;

public class splash
{
static Image i = Toolkit.getDefaultToolkit().getImage("image/splash.jpg");

public static void main(String args[]){

JWindow jw = new JWindow(){

public void paint(Graphics g){

g.drawImage(i,0,0,i.getWidth(this),i.getHeight(this),this);

}
};


jw.setSize(500,300);
jw.setVisible(true);



}
}
The Jwindiw is display but it is blank hence no image gets displayed in it.
Is there anything wrong with the code or it has some other technique of doing it?
please help
shyam
21 years ago
Thanks a lot Ilja and Michael for your advice.
21 years ago
I have done exactly the same thing but i have grouped several instructions in a class.For example I have grouped the Arithmetic instructions,memory access instructions in different classes.I want to know will there be any performance problems if I call these methods using reflection.
thanks
shyam
21 years ago
Hi guys
Thanks for your advce
Actually I am designing a simulation system for 8051 microcontroller.I have implemented all the instructions of 8051 in the form of methods in the main CPU class .
Earlier I wrote the CPU class in C++ and thought I will use JNI to link it with java.I used function pointers there to invoke each instruction.But I faced problems and decided to implement in pure java.
NOw I have written it in java but I cant invoke the instructions as there is no function pointer.As you have adviced I will try to use reflection now.
But one thing i am worried about: Is reflection slow?
thanks
shyam
21 years ago
Hello to all Java Geeks
Those of you who are familier with C/C++ must have heard of function pointers.i want to know wheather such concept applies to java or not.And if it does then how to implement it.
Thanks
Shyam
21 years ago
You shold not use invokelater().Since invokelater() executes the thread in the event dispatched thread and as your thread runs in an infinite loop it will never end and your application will hang.
Why dont you run it as a seperate thread alltogether.
new Thread(Runable/*your Runnable class*/).start();
21 years ago
Philip
Can you please tell me what is a DHCP server.
regards Shyam
21 years ago
You can use InetAddress.getLocalHost() method defined in the java.net package.
21 years ago