Karan Galhotra

Greenhorn
+ Follow
since Jun 01, 2007
Merit badge: grant badges
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 Karan Galhotra

Hi everybody,

Can somebody tell me, how to put a logo(Image) on a JDialog with its title name. Here is my code i want to put a logo(Image) before the title name of my dialog viz is ("my dialog")... plzzz can any body help me out.

public void Dialog2()
{
JDialog dialog = new JDialog(frame);
dialog.setTitle("my dialog");
dialog.setModal(true);
dialog.setResizable(false);

JPanel passPanel = getPassPanel();
dialog.add(passPanel, BorderLayout.NORTH);

JPanel buttonsPanel = getButtonsPanel();
dialog.add(buttonsPanel, BorderLayout.CENTER);
dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
dialog.setSize(300,130);
dialog.setVisible(true);
dialog.setLocationRelativeTo(frame);
}


Thanks in advance

Karan Galhotra
14 years ago
Thanks a lot friends for your suggestions.

Karan
14 years ago
Hi

I am new to Swings. I have to create a pie chart in core java can anybody
refer me any link or any example.


Thanks
Karan Galhotra
14 years ago
Hello everybody.

I have a desktop Application made in Java Swings(JFrame & JInternalFrame)
I have a to create a screensaver using Core java for my desktop application.Can anybody tell me how to start it. I mean what should i use to built it.

Thkx in Advance

Karan
15 years ago
THkx Darrin & Vanessa
15 years ago
Hi friends

i am new to swings and stucked in a issue.

i want to add a popmenu on button.(Like "Back" button present in internet explorer window)

Thkx in advance
15 years ago
Hello Friends

I m new to Swings. This is my code written below: -

import javax.swing.*;
class menushortkey
{
void simplemenu()
{
JFrame frame = new JFrame();
JMenuBar menubar = new JMenuBar();
JMenu menu1 = new JMenu("my menu");
JMenuItem item1 = new JMenuItem("HIDE");
JMenuItem item2 = new JMenuItem("SHOW");
menu1.add(item1);
menu1.add(item2);
menubar.add(menu1);
frame.setJMenuBar(menubar);
frame.setVisible(true);
frame.setSize(500,300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String[] args)
{
menushortkey sh = new menushortkey();
sh.simplemenu();
}
}
Now i want to open "My Menu" with the help of alt+m(Keys). Plzz help me to do this.

THkx in advance.
15 years ago