Thursday, May 23, 2013

Example code of Look And Feel in Java


Example code of Look And Feel in Java




//import section
import java.awt.Container;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

public class LookAndFeel1 extends JPanel implements ActionListener {
// Creating Button
private JButton jbmMetal = new JButton("Metal");
private JButton jbnMotif = new JButton("Motif");
private JButton jbnWindows = new JButton("Windows");
public LookAndFeel1() {
//add button in windows
add(jbmMetal);
add(jbnMotif);
add(jbnWindows);
jbmMetal.addActionListener(this);
jbnMotif.addActionListener(this);
jbnWindows.addActionListener(this);
}

public void actionPerformed(ActionEvent e) {
Object source = e.getSource();
String laf = "";
//action perform every button
if (source == jbmMetal)
laf = "javax.swing.plaf.metal.MetalLookAndFeel";
else if (source == jbnMotif)
laf = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";
else if (source == jbnWindows)
laf = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
try {
UIManager.setLookAndFeel(laf);
SwingUtilities.updateComponentTreeUI(this);
} catch (Exception excep) {
}
}
public static void main(String[] args) {
//calling frame in main
JFrame frame = new JFrame();
frame.setTitle("Look and Feel Test");
frame.setSize(300, 200);
frame.addWindowListener(new WindowAdapter() {

public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
Container contentPane = frame.getContentPane();
contentPane.add(new LookAndFeel1());
frame.setVisible(true);
}
}

      


// Thanks for Watching this Video If you want to get this code please visit http://satyarahulraj.blogspot.com

0 comments :

Tuesday, May 21, 2013

Add MS. Calculator or MS. Notepad Button in Your Java Project


How to Add MS. Calculator or MS. Notepad Button in Your Java Project.
And coding to run your any dos command through click a button in Java. Let's See This code Example and make your project some thing different.
I hope you Like this code, if any problem plz comment or leave a massage.


/*
* calculator.java
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;

public class calculator extends JFrame implements MouseListener
{
JButton btn1,btn2;
    public calculator()
    {
 Container c=this.getContentPane();
      c.setLayout(null);

 btn1=new JButton("Calculator");
 btn1.setBounds(5,5,150,40);

  btn2=new JButton("Notepad");
 btn2.setBounds(5,55,150,40);

 btn1.addMouseListener(this);
 btn2.addMouseListener(this);

 c.add(btn1);
 c.add(btn2);

}
 public void mouseClicked(MouseEvent me)
     {
      if(me.getSource()==btn1)
      {
      try
          {
String[] command =  new String[1];
          command[0] = "calc";
         Process p = Runtime.getRuntime().exec(command);
          BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));

          BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream()));

          // read the output from the command

          String s = null;
                   while ((s = stdInput.readLine()) != null) {
              System.out.println(s);
          }

          // read any errors from the attempted command

          JOptionPane.showMessageDialog(null,"Thanks to using Microsoft Calculator:::Rahul Raj (Satya)\n");
          while ((s = stdError.readLine()) != null) {
              System.out.println(s);
          }
 }
catch(Exception e){
JOptionPane.showMessageDialog(null,e);
}
     
     }
     if(me.getSource()==btn2)
      {
      try
          {
String[] command =  new String[1];
          command[0] = "notepad";
         Process p = Runtime.getRuntime().exec(command);
          BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream()));

          BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream()));

          // read the output from the command

          String s = null;
                   while ((s = stdInput.readLine()) != null) {
              System.out.println(s);
          }

          // read any errors from the attempted command

          JOptionPane.showMessageDialog(null,"Thanks to using Microsoft Calculator:::Rahul Raj (Satya)\n");
          while ((s = stdError.readLine()) != null) {
              System.out.println(s);
          }
 }
catch(Exception e){
JOptionPane.showMessageDialog(null,e);
}
     
     }
     }
  public void mouseEntered(MouseEvent me)
  {
    if(me.getSource()==btn1)
{
 btn1.setForeground(Color.blue);

}
if(me.getSource()==btn2)
{
 btn2.setForeground(Color.blue);

}
  }
  public void mousePressed(MouseEvent me)
  {
  }
  public void mouseExited(MouseEvent me)
  {
    if(me.getSource()==btn1)
{
 btn1.setForeground(Color.red);
}
if(me.getSource()==btn2)
{
 btn2.setForeground(Color.red);
}
  }
  public void mouseReleased(MouseEvent me)
  {
  }
 
 
  public static void main(String args[])
    {
    calculator a=new calculator();
    a.setBounds(400,400,350,300);
    a.setVisible(true);
    a.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}

0 comments :

Windows 8 Shortcuts Key


List of Windows 8 Shortcuts




With a paradigm shift in how we look at a Start screen, Windows 8 has added a lot of shortcuts for easier navigation. Check out a loooooong list of shortcuts for Windows 8 to make your life simpler.


Windows key: Switch between Modern Desktop Start screen and the last accessed application
Windows key + C: Access the charms bar
Windows key + Tab: Access the Modern Desktop Taskbar
Windows key + I: Access the Settings charm
Windows key + H: Access the Share charm
Windows key + K: Access the Devices charm
Windows key + Q: Access the Apps Search screen
Windows key + F: Access the Files Search screen
Windows key + W: Access the Settings Search screen
Windows key + P: Access the Second Screen bar
Windows key + Z: Brings up the App Bar when you have a Modern Desktop App running
Windows key + X: Access the Windows Tools Menu
Windows key + O: Lock screen orientation
Windows key + . : Move the screen split to the right
Windows key + Shift + . : Move the screen split to the left
Windows key + V: View all active Toasts/Notifications
Windows key + Shift + V: View all active Toasts/Notifications in reverse order
Windows key + PrtScn: Takes a screenshot of the screen and automatically saves it in the Pictures folder as Screenshot
Windows key + Enter: Launch Narrator        
Windows key + E: Open Computer
Windows key + R: Open the Run dialog box
Windows key + U: Open Ease of Access Center
Windows key + Ctrl + F: Open Find Computers dialog box
Windows key + Pause/Break: Open the System page
Windows key + 1..10: Launch a program pinned on the Taskbar in the position indicated by the number
Windows key + Shift + 1..10: Launch a new instance of a program pinned on the Taskbar in the position indicated by the number
Windows key + Ctrl + 1..10: Access the last active instance of a program pinned on the Taskbar in the position indicated by the number
Windows key + Alt + 1..10: Access the Jump List of a program pinned on the Taskbar in the position indicated by the number
Windows key + B: Select the first item in the Notification Area and then use the arrow keys to cycle through the items Press Enter to open the selected item
Windows key + Ctrl + B: Access the program that is displaying a message in the Notification Area
Windows key + T: Cycle through the items on the Taskbar
Windows key + M: Minimize all windows
Windows key + Shift + M: Restore all minimized windows
Windows key + D: Show/Hide Desktop (minimize/restore all windows)
Windows key + L: Lock computer
Windows key + Up Arrow: Maximize current window
Windows key + Down Arrow: Minimize/restore current window
Windows key + Home: Minimize all but the current window
Windows key + Left Arrow: Tile window on the left side of the screen
Windows key + Right Arrow: Tile window on the right side of the screen
Windows key + Shift + Up Arrow: Extend current window from the top to the bottom of the screen
Windows key + Shift + Left/Right Arrow: Move the current window from one monitor to the next
Windows key + F1: Launch Windows Help and Support

PageUp: Scroll forward on the Modern Desktop Start screen
PageDown: Scroll backward on the Modern Desktop Start screen
Esc: Close  a charm
Ctrl + Esc: Switch between Modern Desktop Start screen and the last accessed application
Ctrl + Mouse scroll wheel: Activate the Semantic Zoom on the Modern Desktop screen

Alt: Display a hidden Menu Bar
Alt + D: Select the Address Bar
Alt + P: Display the Preview Pane in Windows Explorer
Alt + Tab: Cycle forward through open windows
Alt + Shift + Tab: Cycle backward through open windows
Alt + F: Close the current window Open the Shut Down Windows dialog box from the Desktop
Alt + Spacebar: Access the Shortcut menu for current window
Alt + Esc: Cycle between open programs in the order that they were opened
Alt + Enter: Open the Properties dialog box of the selected item
Alt + PrtScn: Take a screen shot of the active Window and place it in the clipboard
Alt + Up Arrow: Move up one folder level in Windows Explorer (Like the Up Arrow in XP)
Alt + Left Arrow: Display the previous folder
Alt + Right Arrow: Display the next folder
Shift + Insert: CD/DVD Load CD/DVD without triggering Autoplay or Autorun
Shift + Delete: Permanently delete the item (rather than sending it to the Recycle Bin)
Shift + F6: Cycle backward through elements in a window or dialog box
Shift + F10: Access the context menu for the selected item
Shift + Tab: Cycle backward through elements in a window or dialog box
Shift + Click: Select a consecutive group of items
Shift + Click on a Taskbar button: Launch a new instance of a program
Shift + Right-click on a Taskbar button: Access the context menu for the selected item
Ctrl + A: Select all items
Ctrl + C: Copy the selected item
Ctrl + X: Cut the selected item
Ctrl + V: Paste the selected item
Ctrl + D: Delete selected item
Ctrl + Z: Undo an action
Ctrl + Y: Redo an action
Ctrl + N: Open a new window in Windows Explorer
Ctrl + W: Close current window in Windows Explorer
Ctrl + E: Select the Search box in the upper right corner of a window
Ctrl + Shift + N: Create new folder
Ctrl + Shift + Esc: Open the Windows Task Manager
Ctrl + Alt + Tab: Use arrow keys to cycle through open windows
Ctrl + Alt + Delete: Access the Windows Security screen 
Ctrl + Click: Select multiple individual items
Ctrl + Click and drag an item: Copies that item in the same folder
Ctrl + Shift + Click and drag an item: Creates a shortcut for that item in the same folder
Ctrl + Tab:  Move forward through tabs
Ctrl + Shift + Tab: Move backward through tabs
Ctrl + Shift + Click on a Taskbar button: Launch a new instance of a program as an Administrator
Ctrl + Click on a grouped Taskbar button: Cycle through the instances of a program in the group
F1: Display Help
F2: Rename a file
F3: Open Search
F4: Display the Address Bar list
F5: Refresh display
F6: Cycle forward through elements in a window or dialog box
F7: Display command history in a Command Prompt
F10: Display hidden Menu Bar
F11: Toggle full screen display
Tab: Cycle forward through elements in a window or dialog box
PrtScn: Take a screen shot of the entire screen and place it in the clipboard
Home: Move to the top of the active window
End: Move to the bottom of the active window
Delete: Delete the selected item
Backspace: Display the previous folder in Windows Explorer  Move up one folder level in Open or Save dialog box
Esc: Close a dialog box
Num Lock Enabled + Plus (+): Display the contents of the selected folder 
Num Lock Enabled + Minus (-): Collapse the selected folder
Num Lock Enabled + Asterisk (*): Expand all subfolders under the selected folder    
Press Shift 5 times Turn StickyKeys on or off
Hold down right Shift for 8 seconds Turn FilterKeys on or off
Hold down Num Lock for 5 seconds Turn ToggleKeys on or off


Hope this helps. Happy reading!

0 comments :

Samsung Secret Codes

Samsung Cell Phone Secret Codes

Samsung cell phons have good appearances and good build quality, hence it’s very popular. Below are some secret codes for your Samsung cell












phone.

IMEI code: *#06#
Help Menu: *#9998*4357#
Java menu (GRPS/CSD settings for JAVA server): *#9998*5282#
Monitor Mode: *#9999#0#
Software Version: *#9999# or *#9998*9999#
Hardware Version: *#8888# or *#9998*8888#
Sim Infos: *#9998*746# or *#9998*0746# or *#0746#
Display Contrast: *#9998*523# or *#9998*0523# or *#0523#
Vibration On (until you push OK): *#9998*842# or *#9998*0842# or *#0842#
Buzzer On (until you push OK): *#9998*289# or *#9998*0289# or *#0289#
Battery & Field Infos: *#9998*288# or *#9998*0288# or *#0288#
Error log: *#9998*377# or *#9998*0377#
Sim Service table: *#9998*778# or *#9998*0778# or *#0778#
Show date and alarm clock: *#9998*782#
Show network information: *#8999*638#
Change operator logo at startup: *#9998*5646#
Production number: *#9998*76#
View melody for alarm: *#9998*968#
Non-Volatile Memory (NVM): *#9998*585#
Digital Audio Interference Off: *#3243948#
Digital Audio Interference On: *#32436837#

0 comments :

Install Java Development Kit And Set Path Through Dos Mode

How to Install Java Development Kit And Set Path Through Dos Mode & also Computer Properties in Windows 8 pro.







 I hope it is very useful for you Guy's. If You have any question about this instillation and also any technical support Pleas Comment  or leave me a massage. I'm Trying to solve your problem. Thanks


0 comments :

Sunday, May 19, 2013

Drew Rectangle in Java Example


Drew Rectangle in Java Example.. 



-------------------------------------------------------------------------------------
/**
* @(#)MainClass11.java
*
*
* @author Satya
* @https://www.facebook.com/groups/java.satya/
* @http://satyarahulraj.blogspot.in/
* @version 1.00 2012/11/3
*/

import java.awt.Graphics;
import java.awt.*;
import javax.swing.*;
import javax.swing.JFrame;
import javax.swing.JPanel;

public class MainClass11 extends JPanel {

  public void paint(Graphics g) {
    g.drawString(g.getClipBounds().toString(), 10, 30);

      g.setColor(Color.RED);
    g.clipRect(10, 40, getSize().width - 20, getSize().height - 80);

    g.fillOval(0, 0, getSize().width, getSize().height);

    String newClip = g.getClipBounds().toString();

    g.setClip(0, 0, getSize().width, getSize().height);

   
    g.drawString(newClip, 10, getSize().height - 10);
  }

  public static void main(String[] args) {
    JFrame frame = new JFrame("http://www.SatyaRahulRaj.blogspot.com");
    frame.getContentPane().add(new MainClass11());

    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setSize(200, 200);
    frame.setVisible(true);
  }
}

0 comments :

Sunday, May 5, 2013

Dos Tricks and Shortcuts

Dos Tricks and Shortcuts


Full Codes. Kindly Add if U know more !

Accessibility Controls                          access.cpl
Add Hardware Wizard                        hdwwiz.cpl
Add/Remove Programs                      appwiz.cpl
Administrative Tools                          control admintools
Automatic Updates                            wuaucpl.cpl
Bluetooth Transfer Wizard                 fsquirt
Calculator                                        calc
Certificate Manager                          certmgr.msc
Character Map                                 charmap
Check Disk Utility                              chkdsk
Clipboard Viewer                              clipbrd
Command Prompt                             cmd
Component Services                          dcomcnfg
Computer Management                      compmgmt.msc
timedate.cpl
ddeshare
Device Manager                                devmgmt.msc
Direct X Control Panel (If Installed)*   directx.cpl
Direct X Troubleshooter                    dxdiag
Disk Cleanup Utility                           cleanmgr
Disk Defragment                              dfrg.msc
Disk Management                            diskmgmt.msc
Disk Partition Manager                     diskpart
Display Properties                            control desktop
Display Properties                            desk.cpl
Display Properties (w/Appearance Tab Preselected)
control color
Dr. Watson System Troubleshooting Utility
drwtsn32
Driver Verifier Utility                      verifier
Event Viewer                                eventvwr.msc
File Signature Verification Tool       sigverif
Findfast                                        findfast.cpl
Folders Properties                         control folders
Fonts                                           control fonts
Fonts Folder                                 fonts
Free Cell Card Game                     freecell
Game Controllers                          joy.cpl
Group Policy Editor (XP Prof)          gpedit.msc
Hearts Card Game                         mshearts
Iexpress Wizard                            iexpress
Indexing Service                           ciadv.msc
Internet Properties                        inetcpl.cpl
IP Configuration (Display Connection Configuration)
ipconfig /all
IP Configuration (Display DNS Cache Contents)
ipconfig /displaydns
IP Configuration (Delete DNS Cache Contents)
ipconfig /flushdns
IP Configuration (Release All Connections)
ipconfig /release
IP Configuration (Renew All Connections)
ipconfig /renew
IP Configuration (Refreshes DHCP & Re-Registers DNS)
ipconfig /registerdns
IP Configuration (Display DHCP Class ID)
ipconfig /showclassid
IP Configuration (Modifies DHCP Class ID)
ipconfig /setclassid
Java Control Panel (If Installed)
jpicpl32.cpl
Java Control Panel (If Installed)
javaws
Keyboard Properties                     control keyboard
Local Security Settings                  secpol.msc
Local Users and Groups                 lusrmgr.msc
Logs You Out Of Windows             logoff
Microsoft Chat                              winchat
Minesweeper Game                      winmine
Mouse Properties                          control mouse
Mouse Properties                          main.cpl
Network Connections                     control netconnections
Network Connections                     ncpa.cpl
Network Setup Wizard                   netsetup.cpl
Notepad                                        notepad
Nview Desktop Manager (If Installed)
nvtuicpl.cpl
Object Packager                            packager
ODBC Data Source Administrator     odbccp32.cpl
On Screen Keyboard                      osk
Opens AC3 Filter (If Installed)         ac3filter.cpl
Password Properties                      password.cpl
Performance Monitor                     perfmon.msc
Performance Monitor                     perfmon
Phone and Modem Options             telephon.cpl
Power Configuration                      powercfg.cpl
Printers and Faxes                        control printers
Printers Folder                              printers
Private Character Editor                 eudcedit
Quicktime (If Installed)                  QuickTime.cpl
Regional Settings                          intl.cpl
Registry Editor                              regedit
Registry Editor                              regedit32
Remote Desktop                           mstsc
Removable Storage                      ntmsmgr.msc
Removable Storage Operator Requests
ntmsoprq.msc
Resultant Set of Policy (XP Prof)   rsop.msc
Scanners and Cameras                sticpl.cpl
Scheduled Tasks                         control schedtasks
Security Center                           wscui.cpl
Services                                     services.msc
Shared Folders                           fsmgmt.msc
Shuts Down Windows                  shutdown
Sounds and Audio                       mmsys.cpl
Spider Solitare Card Game          spider
SQL Client Configuration              cliconfg
System Configuration Editor         sysedit
System Configuration Utility          msconfig
System File Checker Utility (Scan Immediately)
sfc /scannow
System File Checker Utility (Scan Once At Next Boot)
sfc /scanonce
System File Checker Utility (Scan On Every Boot)
sfc /scanboot
System File Checker Utility (Return to Default Setting)
sfc /revert
System File Checker Utility (Purge File Cache)
sfc /purgecache
System File Checker Utility (Set Cache Size to size x)
sfc /cachesize=x
System Properties                       sysdm.cpl
Task Manager                             taskmgr
Telnet Client                               telnet
User Account Management          nusrmgr.cpl
Utility Manager                           utilman
Windows Firewall                       firewall.cpl
Windows Magnifier                     magnify
Windows Management Infrastructure
wmimgmt.msc
Windows System Security Tool     syskey
Windows Update Launches           wupdmgr
Windows XP Tour Wizard            tourstart
Wordpad                                   write



Run line commands can be very useful some times, its better to know them here are all the commands that i know u might find them usefull too Commands are same for Windows xp pro and home
Run Line Commands

These are GUI applications that can be opened from the run line.
These applications are not located in the C:\windows\system32\ directory, the
keys for these applications are located in the registry under:
HKLM\software\microsoft\windows\currentversion\app paths
BCKGZM.EXE - Backgammon
CHKRZM.EXE - Checkers
CONF.EXE - NetMeeting
DIALER.EXE - Phone Dialer
HELPCTR.EXE - Help and Support
HRTZZM.EXE - Internet Hearts
HYPERTRM.EXE - HyperTerminal
ICWCONN1.EXE - Internet Connection Wizard
IEXPLORE.EXE - Internet Explorer
INETWIZ.EXE - Setup Your Internet Connection
INSTALL.EXE - User's Folder
MIGWIZ.EXE - File and Settings Transfer Wizard
MOVIEMK.EXE - Windows Movie Maker
MPLAYER2.EXE - Windows Media Player Version 6.4.09.1120
MSCONFIG.EXE - System Configuration Utility
MSIMN.EXE - Outlook Express
MSINFO32.EXE - System Information
MSMSGS.EXE - Windows Messenger
MSN6.EXE - MSN Explorer
PBRUSH.EXE - Paint
PINBALL.EXE - Pinball
RVSEZM.EXE - Reversi
SHVLZM.EXE - Spades
TABLE30.EXE - User's Folder
WAB.EXE - Windows Address Book
WABMIG.EXE - Address Book Import Tool
WINNT32.EXE - User's Folder
WMPLAYER.EXE - Windows Media Player
WRITE.EXE - Wordpad

These .EXE files reside in (c:\windows\system32\) or (c:\windows\) directory.
ACCWIZ.EXE - Accessibility Wizard
CALC.EXE - Calculator
CHARMAP.EXE - Character Map
CLEANMGR.EXE - Disk Space Cleanup Manager
CLICONFG.EXE - SQL Client Configuration Utility
CLIPBRD.EXE - Clipbook Viewer
CLSPACK.EXE - Class Package Export Tool
CMD.EXE - Command Line
CMSTP.EXE - Connection Manager Profile Installer
CONTROL.EXE - Control Panel
DCOMCNFG.EXE - Component Services
DDESHARE.EXE - DDE Share
DRWATSON.EXE - Doctor Watson v1.00b
DRWTSN32.EXE - Doctor Watson Settings
DVDPLAY.EXE - DVD Player
DXDIAG.EXE - DirectX Diagnostics
EUDCEDIT.EXE - Private Character Editor
EVENTVWR.EXE - Event Viewer
EXPLORER.EXE - Windows Explorer
FREECELL.EXE - Free Cell
FXSCLNT.EXE - Fax Console
FXSCOVER.EXE - Fax Cover Page Editor
FXSEND.EXE - MS Fax Send Note Utility
IEXPRESS.EXE - IExpress 2.0
LOGOFF.EXE - System Logoff
MAGNIFY.EXE - Microsoft Magnifier
MMC.EXE - Microsoft Management Console
MOBSYNC.EXE - Microsoft Synchronization Manager
MPLAY32.EXE - Windows Media Player version 5.1
MSHEARTS.EXE - Hearts
MSPAINT.EXE - Paint
MSTSC.EXE - Remote Desktop Connection
NARRATOR.EXE - Microsoft Narrator
NETSETUP.EXE - Network Setup Wizard
NOTEPAD.EXE - Notepad
NSLOOKUP.EXE - NSLookup Application
NTSD.EXE - Symbolic Debugger for Windows 2000
ODBCAD32.EXE - ODBC Data Source Administrator
OSK.EXE - On Screen Keyboard
OSUNINST.EXE - Windows Uninstall Utility
PACKAGER.EXE - Object Packager
PERFMON.EXE - Performance Monitor
PROGMAN.EXE - Program Manager
RASPHONE.EXE - Remote Access Phonebook
REGEDIT.EXE - Registry Editor
REGEDT32.EXE - Registry Editor
RESET.EXE - Resets Session
RSTRUI.EXE - System Restore
RTCSHARE.EXE - RTC Application Sharing
SFC.EXE - System File Checker
SHRPUBW.EXE - Create Shared Folder
SHUTDOWN.EXE - System Shutdown
SIGVERIF.EXE - File Signature Verification
SNDREC32.EXE - Sound Recorder
SNDVOL32.EXE - Sound Volume
SOL.EXE - Solitaire

SPIDER.EXE - Spider Solitaire
SYNCAPP.EXE - Create A Briefcase
SYSEDIT.EXE - System Configuration Editor
SYSKEY.EXE - SAM Lock Tool
TASKMGR.EXE - Task Manager
TELNET.EXE - MS Telnet Client
TSSHUTDN.EXE - System Shutdown
TOURSTART.EXE - Windows Tour Launcher
UTILMAN.EXE - System Utility Manager
USERINIT.EXE - My Documents
VERIFIER.EXE - Driver Verifier Manager
WIAACMGR.EXE - Scanner and Camera Wizard
WINCHAT.EXE - Windows for Workgroups Chat
WINHELP.EXE - Windows Help Engine
WINHLP32.EXE - Help
WINMINE.EXE - Minesweeper
WINVER.EXE - Windows Version Information
WRITE.EXE - WordPad
WSCRIPT.EXE - Windows Script Host Settings
WUPDMGR.EXE - Windows Update

The following are Control Panel applets that can be run from the run line.
They are located in the c:\windows\system32 directory, and have the file type
extension ".CPL".
ACCESS.CPL - Accessibility Options
APPWIZ.CPL - Add or Remove Programs
DESK.CPL - Display Properties
HDWWIZ.CPL - Add Hardware Wizard
INETCPL.CPL - Internet Explorer Properties
INTL.CPL - Regional and Language Options
JOY.CPL - Game Controllers
MAIN.CPL - Mouse Properties
MMSYS.CPL - Sounds and Audio Device Properties
NCPA.CPL - Network Connections
NUSRMGR.CPL - User Accounts
ODBCCP32.CPL - ODBC Data Source Administrator
POWERCFG.CPL - Power Options Properties
SYSDM.CPL - System Properties
TELEPHON.CPL - Phone and Modem Options
TIMEDATE.CPL - Date and Time Properties
The following are Microsoft Management Console Snap-ins that can be opened from
the run line. These applications have the file type extension ".MSC".
CERTMGR.MSC - Certificates
CIADV.MSC - Indexing Service
COMPMGMT.MSC - Computer Management
DEVMGMT.MSC - Device Manager
DFRG.MSC - Disk Defragmenter
DISKMGMT.MSC - Disk Management
EVENTVWR.MSC - Event Viewer
FSMGMT.MSC - Shared Folders
LUSRMGR.MSC - Local Users and Groups
NTMSMGR.MSC - Removable Storage
NTMSOPRQ.MSC - Removable Storage Operator Requests
PERFMON.MSC - Performance Monitor
SERVICES.MSC - Services
WMIMGMT.MSC - Windows Management Infrastructure

Calculation on command Prompt ! u knew dis???

The command processor CMD.EXE comes with a mini-calculator that can perform simple arithmetic on 32-bit signed integers:

C:\>set /a 2+2
4
C:\>set /a 2*(9/2)
8
C:\>set /a (2*9)/2
9
C:\>set /a "31>>2"
7

0 comments :

The Imagine Nokia Shortcut Key


NOKIA

1 Imagine ur cell battery is very low, u r expecting an important call and u don't have a charger.

Nokia instrument comes with a reserve battery. To activate, key is "*3370#"

Ur cell will restart with this reserve and ur instrument will show a 50% incerase in battery.

This reserve will get charged when u charge ur cell next time.

*3370# Activate Enhanced Full Rate Codec (EFR)-Your phone uses the best sound quality but talk time is reduced by approx. 5%
#3370# Deactivate Enhanced Full Rate Codec( EFR)

*#4720# Activate Half Rate Codec - Your phone uses a lower quality sound
but you should gain approx 30% more Talk Time
*#4720# Deactivate Half Rate Codec

2 *#0000# Displays your phones software version,

1st Line :S oftware Version,
2nd Line : Software Release Date,
3rd Line : Compression Type
3 *#9999# Phones software v ersion if *#0000# does not work

4 *#06# For checking the International Mobile Equipment Identity (IMEI Number)

5 #pw+1234567890+1# Provider Lock Status. (use the "*" button to obtain the "p,w" and "+" symbols)

6 #pw+1234567890+2# Network Lock Status. (use the "*" button to obtain the "p,w" and "+" symbols)

7 #pw+1234567890+3# Country Lock Status. (use the "*" button to obtain the "p,w" and "+" symbols)

8 #pw+1234567890+4# SIM Card Lock Status.(use the "*" button to obtain the "p,w" and "+" symbols)

9 *#147# (vodafone) this lets you know who called you last *#1471# Last call (Only vodofone)

10 *#21# Allows you to check the number that "All Calls" are diverted To

11 *#2640# Displays security code in use

12 *#30# Lets you see the private number

13 *#43# Allows you to check the "Call Waiting" status of your phone.

14 *#61# Allows you to check the number that "On No Reply" calls are diverted to

15 *#62# Allows you to check the number that "Divert If Unrea chable(no service)" calls are diverted to

16 *#67# Allows you to check the number that "On Busy Calls" are diverted to

17 *#67705646#R emoves operator logo on 3310 & 3330

18 *#73# Reset phone timers and game scores

19 *#746025625# Displays the SIM Clock status, if your phone supports this power saving feature "SIM Clock Stop Allowed", it
means you will get the best standby time possible

20 *#7760# Manufactures code

21 *#7780# Restore factory settings

22 *#8110# Software version for the nokia 8110

23 *#92702689# (to rember *#WAR0ANTY#)

Displays -
1.Serial Number,
2.Date Made
3.Purchase Date,
4.Date of last repair (0000 for no repairs),
5.Transfer User Data.
To exit this mode -you need to switch your phone off then on again

24 *#94870345123456789# Deactivate the PWM-Mem

25 **21*number# Turn on "All Calls" diverting to the phone number entered

26 **61*number# Turn on "No Reply" diverting to the phone number entered

27 **67*number# Turn on "On Busy" diverting to the phone number entered

Each command is prefixed with either one or two * or # characters as follows:
** Register and Activate
* Activate
## De-Register (and Deactivate)
# Deactivate
*# Check Status
© Call button

Once each command has been entered, if it is a network command (as opposed to a local handset command) it must be transmitted to the network by pressing the YES (receiver) key which acts as an enter key - this is represented here with the © character. Always enter numbers in full international format +CountryAreaNumber ( e.g. +447712345678).

Command Description Command String
Security
Change call barring code **03*OldCode*NewCode*NewCode#©
Change call barring code **03*330*OldCode*NewCode*NewCode#©
Change PIN code **04*OldPIN*NewPIN*NewPIN#©
Change PIN2 code **042*OldPIN2*NewPIN2*NewPIN2#©
Unlock PIN code (when PIN is entered wrong 3 times) **05*PUK*NewPIN*NewPIN#©
Unlock PIN2 code (when PIN2 is entered wrong 3 times) **052*PUK2*NewPIN2*NewPIN2#©
Display IMEI *#06#
Call Forwarding (Diversions)
De-register all call diversions ##002#©
Set all configured call diversions to number and activate **004*number#©
De-register all configured call diversions (no answer, not reachable, busy) ##004#©
Unconditionally divert all calls to number and activate **21*number#©
Activate unconditionally divert all calls *21#©
De-register unconditionally divert all calls ##21#©
Deactivate unconditionally divert all calls #21#©
Check status of unconditionally divert all calls *#21#©
Divert on no answer to number and activate **61*number#©
Activate divert on no answer *61#©
De-register divert on no answer ##61#©
Deactivate divert on no answer #61#©
Check status of divert on no answer *#61#©
Divert on not reachable to number and activate **62*number#©
Activate divert on not reachable *62#©
De-register divert on not reachable ##62#©
Deactivate divert on not reachable #62#©
Check status of divert on not reachable *#62#©
Divert on busy to number and activate /td> **67*number#©<
Activate divert on busy *67#©
De-register divert on busy ##67#©
Deactivate divert on busy #67#©
Check status of divert on busy *#67#©
Change number of seconds of ringing for the given service before diverting a call (such as on no answer). Seconds must be a value from 5 to 30. De-registering the same divert will also delete this change! **service*number**seconds#© (Service numbers, see below)
Call barring
Activate barr all outgoing calls (see Security to set code) **33*code#©
Deactivate barr all outgoing calls #33*code#©
Check status of barr all outgoing calls *#33#©
Activate barr all calls **330*code#©
Deactivate barr all calls #330*code#©
Check status of barr all calls /td> *#330*code#©<
Activate barr all outgoing international calls **331*code#©
Deactivate barr all outgoing international calls #331*code#©
Check status of barr all outgoing international calls *#331#©
Activate barr all outgoing international calls except to home country **332*code#©
Deactivate barr all outgoing international calls except to home country #332*code#©
Check status of barr all outgoing international calls except to home country *#332#©
Activate barr all outgoing calls **333*code#©
Deactivate barr all outgoing calls #333*code#©
Check status of barr all outgoing calls *#333#©
Activate barr all incoming calls **35*code#©
Deactivate barr all incoming calls #35*code#©
Check status of barr all incoming calls *#35#©
Activate barr all incoming calls when roaming **351*code#©
Deactivate barr all incoming calls when roaming #351*code#©
Check status of barr all incoming calls when roaming *#351#©
Activate barr all incoming calls **353*code#©
Deactivate barr all incoming calls #353*code#©
Check status of barr all incoming calls *#353#©
Call waiting
Activate call waiting *43*#©
Deactivate call waiting #43##©
Check status of call waiting *#43#©
Calling Line Identification
The following only works if CLIP and CLIR are enabled (ask your service provider)
CLIP: Presentation of the number of the incoming call
Activate CLIP **30#©
Deactivate CLIP ##30#©
Check status of CLIP *#30#©
CLIR: Presentation of one's own number to the to the called party
Activate CLIR **31#©
Activate CLIR for the actual call *31#number©
Deactivate CLIR ##31#©
Deactivate CLIR for the actual call #31#number©
Check status of CLIR *#31#©
COLP: Presentation of the actual number reached (if number called was diverted to another number
Activate COLP *76#©
Deactivate COLP #76#©
Check status of COLP *#76#©
COLR: Presentation of the original number called by the calling party (if the call was diverted to this cellphone)
Activate COLR *77#©
Deactivate COLR #77#©
Check status of COLR *#77#©

0 comments :

Swing form through button in Java

Call a Swing form through button in Java NetBeans.




0 comments :

TabbedPane Example in Java




-------------------------------------------------------------------------------------

/**
* @(#)TabbedPaneExample.java
*
*
* @author Satya
* @https://www.facebook.com/groups/java.satya/
* @version 1.00 2012/11/3
*/

import java.awt.*;

import javax.swing.*;
import java.awt.event.*;

class TabbedPaneExample extends JFrame

{
private JTabbedPane tabbedPane;
private JPanel panel1;
private JPanel panel2;
private JPanel panel3;

public TabbedPaneExample()

{
// NOTE: to reduce the amount of code in this example, it uses
// panels with a NULL layout. This is NOT suitable for
// production code since it may not display correctly for
// a look-and-feel.

setTitle( "Tabbed Pane Application" );

setSize( 300, 200 );
setBackground( Color.gray );

JPanel topPanel = new JPanel();

topPanel.setLayout( new BorderLayout() );
getContentPane().add( topPanel );

// Create the tab pages

createPage1();
createPage2();
createPage3();

// Create a tabbed pane

tabbedPane = new JTabbedPane();
tabbedPane.addTab( "Page 1", panel1 );
tabbedPane.addTab( "Page 2", panel2 );
tabbedPane.addTab( "Page 3", panel3 );
topPanel.add( tabbedPane, BorderLayout.CENTER );
}

public void createPage1()

{
panel1 = new JPanel();
panel1.setLayout( null );

JLabel label1 = new JLabel( "Username:" );

label1.setBounds( 10, 15, 150, 20 );
panel1.add( label1 );

JTextField field = new JTextField();

field.setBounds( 10, 35, 150, 20 );
panel1.add( field );

JLabel label2 = new JLabel( "Password:" );

label2.setBounds( 10, 60, 150, 20 );
panel1.add( label2 );

JPasswordField fieldPass = new JPasswordField();

fieldPass.setBounds( 10, 80, 150, 20 );
panel1.add( fieldPass );
}

public void createPage2()

{
panel2 = new JPanel();
panel2.setLayout( new BorderLayout() );

panel2.add( new JButton( "North" ), BorderLayout.NORTH );

panel2.add( new JButton( "South" ), BorderLayout.SOUTH );
panel2.add( new JButton( "East" ), BorderLayout.EAST );
panel2.add( new JButton( "West" ), BorderLayout.WEST );
panel2.add( new JButton( "Center" ), BorderLayout.CENTER );
}

public void createPage3()

{
panel3 = new JPanel();
panel3.setLayout( new GridLayout( 3, 2 ) );

panel3.add( new JLabel( "Field 1:" ) );

panel3.add( new TextArea() );
panel3.add( new JLabel( "Field 2:" ) );
panel3.add( new TextArea() );
panel3.add( new JLabel( "Field 3:" ) );
panel3.add( new TextArea() );
}

// Main method to get things started

public static void main( String args[] )
{
// Create an instance of the test application
TabbedPaneExample mainFrame = new TabbedPaneExample();
mainFrame.setVisible( true );
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}

0 comments :

Key Listener Calculator Example in Java coding

Key Listener Calculator Example in Java coding



-----------------------------------------------------------------------------------------------------

/**
* @(#)KeyListenerCalculater.java
*
*
* @Satya_Rahul_Raj
* @https://www.facebook.com/groups/java.satya/
* @version 1.00 2012/9/28
*/
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

class Calculater

{
private Double num1,num2,sum,sub,mult,divi;

void accept(double num1,double num2)

{
this.num1=num1;
this.num2=num2;
sum=sub=mult=divi=0.0;
}
double add()
{
return(sum=num1+num2);

}

double minu()
{
return(sub=num1-num2);

}

double multi()
{
return(mult=num1*num2);

}

double divid()
{
return(divi=num1/num2);
}

}

public class KeyListenerCalculater extends JFrame implements KeyListener,FocusListener
{
private JLabel lbl1,lbl2,lbl3,lbl4,lbl5,lbl6;
private JTextField txt1,txt2,txt3;


public KeyListenerCalculater(String s)

{
super (s);
Container c=this.getContentPane();
c.setLayout(null);
lbl1=new JLabel("Enter First Number:");
lbl2=new JLabel("Enter Second Number:");
lbl3=new JLabel("Result:");
lbl4=new JLabel("F1=SUM, F2=SUBTARACT, F3=MULTIPLCATION");
lbl5=new JLabel("F4=DIVISION, ESC=EXIT, DELETE=TO CLAER BOX");
lbl6=new JLabel("https://www.facebook.com/groups/java.satya/");
txt1=new JTextField();
txt2=new JTextField();
txt3=new JTextField();

lbl1.setBounds(10,10,150,30);

lbl2.setBounds(10,50,150,30);
lbl3.setBounds(10,90,150,30);
lbl4.setBounds(10,150,300,30);
lbl5.setBounds(10,190,300,30);
lbl6.setBounds(10,230,300,30);
txt1.setBounds(180,10,100,30);
txt2.setBounds(180,50,100,30);
txt3.setBounds(180,90,100,30);

lbl1.setVisible(true);

lbl2.setVisible(true);
lbl3.setVisible(true);
lbl4.setVisible(true);
lbl5.setVisible(true);
lbl6.setVisible(true);
txt1.setVisible(true);
txt2.setVisible(true);
txt3.setVisible(true);
txt3.setEditable(false);

txt1.addKeyListener(this);

txt2.addKeyListener(this);
txt3.addKeyListener(this);
txt1.addFocusListener(this);
txt2.addFocusListener(this);
txt3.addFocusListener(this);


c.add(lbl1);

c.add(lbl2);
c.add(lbl3);
c.add(lbl4);
c.add(lbl5);
c.add(lbl6);
c.add(txt1);
c.add(txt2);
c.add(txt3);
}

public void keyTyped(KeyEvent ke)
{
}
public void keyPressed(KeyEvent ke)
{

if(ke.getKeyCode()==ke.VK_F1)
{
double a,b;
a=Double.parseDouble(txt1.getText());
b=Double.parseDouble(txt2.getText());
Calculater c=new Calculater();
c.accept(a,b);
txt3.setText(String.valueOf(c.add()));
}
if(ke.getKeyCode()==ke.VK_F2)
{
double a,b;
a=Double.parseDouble(txt1.getText());
b=Double.parseDouble(txt2.getText());
Calculater c=new Calculater();
c.accept(a,b);
txt3.setText(String.valueOf(c.minu()));
}
if(ke.getKeyCode()==ke.VK_F3)
{
double a,b;
a=Double.parseDouble(txt1.getText());
b=Double.parseDouble(txt2.getText());
Calculater c=new Calculater();
c.accept(a,b);
txt3.setText(String.valueOf(c.multi()));
}
if(ke.getKeyCode()==ke.VK_F4)
{
double a,b;
a=Double.parseDouble(txt1.getText());
b=Double.parseDouble(txt2.getText());
Calculater c=new Calculater();
c.accept(a,b);
txt3.setText(String.valueOf(c.divid()));
}
if(ke.getKeyCode()==ke.VK_ESCAPE)
{
System.exit(0);
}
if(ke.getKeyCode()==ke.VK_DELETE)
{
txt1.setText("");
txt2.setText("");
txt3.setText("");
}

}
public void focusGained(FocusEvent fe)
{
if(fe.getSource()==txt1)
{
txt1.setBackground(Color.ORANGE);
txt2.setBackground(Color.PINK);
}
if(fe.getSource()==txt2)
{
txt2.setBackground(Color.ORANGE);
txt1.setBackground(Color.PINK);
}
}
public void focusLost(FocusEvent fe)
{
if(fe.getSource()==txt1)
{

}
if(fe.getSource()==txt2)
{

}
}
public void keyReleased(KeyEvent ke)
{
}
}

class callKeyListenerCalculater
{

public static void main(String args[])
{
KeyListenerCalculater a=new KeyListenerCalculater("Key Listener Calculater BY [Rahul Raj]");
a.setBounds(400,400,350,300);
a.setVisible(true);
a.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}

2 comments :