Windows 7 install and uninstall windows 8
HOW DO I INSTALL WINDOWS 7 AND UNINSTALL WINDOWS 8 ON MY DESKTOP HP 500-37C.
Hi:
That model number does not turn up in the support site.
Please recheck it.
http://h10025.www1.hp.com/ewfrf/wc/document?docname=bph07555&lc=en&cc=us&dlc=en
Depending on the hardware it has, there are some models that can't have W7 installed on them, due to the fact that there are no W7 drivers for some of the hardware.
Similar Messages
-
Have installed and uninstalled Adobe Acrobat XI Pro on my Dell desktop running Windows 7 Professional. Each time I try to open a PDF file, I receive ERROR: 16 message. Would appreciate any suggestions. Thanks.
Hi Doug Talbott,
Please refer to the page associated with this link (Configuration error 16 | CC, CS) and follow the procedure detailed for Windows 7 and let me know if your issue gets resolved.
Regards,
Rahul Tyagi -
I had the older version of ITunes and then it disappeared. When I try to install the new version, I keep getting "unable to install ITunes, Error 7 (windows error 5) message. I have repeatedly installed and uninstalled iTunes without luck. Any chance of actually getting this on Windows 8.1 or not? I am assuming I also lost my library during this.
Hey there Stardust37,
Welcome to Apple Support Communities.
The article linked below provides troubleshooting tips that can help you resolve the iTunes installation issue alert message that you’re seeing on your PC.
iTunes for Windows: "Error 7" message when opening iTunes - Apple Support
Cheers,
-Jason -
I have tried numerous times to install and uninstall i tunes on windows vista and I keep getting an error message of no apple support. Anyone have a solution to this?
For general advice see Troubleshooting issues with iTunes for Windows updates.
The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version, or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
Your library should be unaffected by these steps but there are also links to backup and recovery advice should it be needed.
tt2 -
I am wondering if it is possible to install and run Windows Server 2008 on a Mac Mini Server as a VM as my main application uses Windows VisualBasic and Fox Pro and requires a Static IP to connect to it, My other offices connects to Windows Server via RDP.
Basically I am researching a Server for the same purpose and since Mac Mini and OsX both are robust in nature it can fit the bill if every thing work fine.
ThanksFrom the Parallels website:
32-bit Operating Systems
Windows 8 with: Windows 8, 8.1 (when available)
Windows 7 SP1
Windows Vista SP0, SP1, SP2
Windows Server 2008 R2, SP2, SP1, SP0
64-bit Operating Systems
Windows 8
Windows 7 SP1
Windows Vista SP0, SP1, SP2
Windows Server 2012
Windows Server 2008 R2, SP2, SP1, SP0
I do suggest that you upgrade RAM to at least 8gig
if you haven't already.
FWIW, I currently use Win8/64 bit with Parallels on a 2011 Mini Server
using the windows environment for engineering applications and have
had no issues. I am running Mountain Lion but do not have the
Server app installed. -
As we all know,
the Windows Server Essentials Experience role is available in Windows Server 2012 R2 Standard and Windows Server 2012 R2 Datacenter. We can add the Windows Server
Essentials Experience role in Server Manager or via Windows PowerShell.
In this article, we introduce the steps to install and configure Windows
Server Essentials Experience role on Windows Server 2012 R2 Standard via PowerShell locally and remotely. For better analyze, we divide this article into two parts.
Before installing the Windows Server Essentials Experience Role, please use
Get-WindowsFeature
PowerShell cmdlet to ensure the Windows Server Essentials Experience (ServerEssentialsRole) is available. (Figure 1)
Figure 1.
Part 1: Install Windows Server Essentials Experience role locally
Add Windows Server Essentials Experience role
Run Windows PowerShell as administrator, then type
Add-WindowsFeature ServerEssentialsRole cmdlet to install Windows Server Essentials Experience role. (Figure 2)
Figure 2.
Note: It is necessary to configure Windows Server Essentials Experience (Post-deployment Configuration). Otherwise, you will encounter following issue when opening Dashboard.
(Figure 3)
Figure 3.
2. Configure Windows Server Essentials Experience role
(1) In an existing domain environment
Firstly, please join the Windows Server 2012 R2 Standard computer to the existing domain through the path:
Control Panel\System\Change Settings\”Change…”\Member of. (Figure 4)
Figure 4.
After that, please install Windows Server Essentials Experience role as original description. After installation completed, please use the following command to configure Windows
Server Essentials:
Start-WssConfigurationService –Credential <Your Credential>
Note: The type of
Your Credential should be as: Domain-Name\Domain-User-Account.
You must be a member of the Enterprise Admin group and Domain Admin group in Active Directory when using the command above to configure Windows Server Essentials. (Figure 5)
Figure 5.
Next, you can type the password for the domain account. (Figure 6)
Figure 6.
After setting the credential, please type “Y” to continue to configure Windows Server Essentials. (Figure 7)
Figure 7.
By the way, you can use
Get-WssConfigurationStatus
PowerShell cmdlet to
get the status of the configuration of Windows Server Essentials. Specify the
ShowProgress parameter to view a progress indicator. (Figure 8)
Figure 8.
(2) In a non-domain environment
Open PowerShell (Run as Administrator) on the Windows Server 2012 R2 Standard and type following PowerShell cmdlets: (Figure 9)
Start-WssConfigurationService -CompanyName "xxx" -DNSName "xxx" -NetBiosName "xxx" -ComputerName "xxx” –NewAdminCredential $cred
Figure 9.
After you type the commands above and click Enter, you can create a new administrator credential. (Figure 10)
After creating the new administrator credential, please type “Y” to continue to configure Windows Server Essentials. (Figure 11)
After a reboot, all the configurations will be completed and you can open the Windows Server Essentials Dashboard without any errors. (Figure 12)
Figure 12.
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.Part 2: Install and configure Windows Server Essentials Experience role remotely
In an existing domain environment
In an existing domain environment, please use following command to provide credential and then add Server Essentials Role: (Figure 13)
Add-WindowsFeature -Name ServerEssentialsRole
-ComputerName xxx -Credential DomainName\DomainAccount
Figure 13.
After you enter the credential, it will start install Windows Server Essentials role on your computer. (Figure 14)
Figure 14.
After the installation completes, it will return the result as below:
Figure 15.
Next, please use the
Enter-PSSession
cmdlet and provide the correct credential to start an interactive session with a remote computer. You can use the commands below:
Enter-PSSession –ComputerName
xxx –Credential DomainName\DomainAccount (Figure 16)
Figure 16.
Then, please configure Server Essentials Role via
Add-WssConfigurationService cmdlet and it also needs to provide correct credential. (Figure 17)
Figure 17.
After your credential is accepted, it will update and prepare your server. (Figure 18)
Figure 18.
After that, please type “Y” to continue to configure Windows Server Essentials. (Figure 19)
Figure 19.
2. In a non-domain environment
In my test environment, I set up two computers running Windows Server 2012 R2 Standard and use Server1 as a target computer. The IP addresses for the two computers are as
below:
Sevrer1: 192.168.1.54
Server2: 192.168.1.53
Run
Enable-PSRemoting –Force on Server1. (Figure 20)
Figure 20.
Since there is no existing domain, it is necessary to add the target computer (Server1) to a TrustedHosts list (maintained by WinRM) on Server 2. We can use following command
to
add the TrustedHosts entry:
Set-Item WSMan:\localhost\Client\TrustedHosts IP-Address
(Figure 21)
Figure 21.
Next, we can use
Enter-PSSession
cmdlet and provide the correct credential to start an interactive session with the remote computer. (Figure 22)
Figure 22.
After that, you can install Windows Server Essentials Experience Role remotely via Add-WindowsFeature ServerEssentialsRole cmdlet. (Figure 23)
Figure 23.
From figure 24, we can see that the installation is completed.
Figure 24.
Then you can use
Start-WssConfigurationService cmdlet to configure Essentials Role and follow the steps in the first part (configure Windows Server Essentials Experience in a non-domain environment) as the steps would be the same.
The figure below shows the status of Windows Server Essentials.
Figure
25.
Finally, we have successfully configured Windows Server Essentials on Server1. (Figure 26)
Figure 26.
More information:
[Forum
FAQ] Introduce Windows Powershell Remoting
Windows Server Essentials Setup Cmdlets
Please click to vote if the post helps you. This can be beneficial to other community members reading the thread. -
Uninstalling Windows 7 and Reinstalling Windows 7
My HP Pavillion (p7-1254) Windows 7 operating system is corrupt and I was told to "Uninstall Windows 7 and reinstall Windows" using the backup/recovery disks made for me at the time of purchase. I need step by step instructions to do this and need to know how/where to find such information. Any help with this is greatly appreciated.
This question was solved.
View Solution.Hi,
Please use the following steps:
http://www.ehow.com/how_5824327_use-hp-recovery-discs.html
Hope this helps.
BH
**Click the KUDOS thumb up on the left to say 'Thanks'**
Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem. -
I have tried to access the itunes store by many different means. I know I have account balance as I put in 2 gift cards back in March and have not used them all. I recently installed and uninstalled itunes several times but I still cannot open it on my computer. When plugging in my ipod shuffle it does not automatically load either although my computer says it's working correctly.
Click on the "Start" button. Click "Run." Type the word "cmd" in the open box. When the DOS screen comes up, type "netsh winsock reset." Press "Enter." Type "exit" to close the DOS window and go back to Windows.
Restart the computer.
Read more: http://www.ehow.com/how_2125133_do-winsock-reset.html#ixzz2kyccghec -
How can I download itunes when I get the following errors ..ituneshelper did not install correctly error 7..I .have installed and uninstalled a dozen times with various fixes...b noir for example and used Revo to clean up.
This has been a problem for 6 weeks now, I retry when I have time and patience and use my other laptop which is also Windows 7 and runs with no problem.
Every attempt fails when all seems fine on the desktop and I try to log on to Itunes I get the errors.
Any help greatly appreciated.
billymacGo to Control Panel > Add or Remove Programs (Win XP) or Programs and Features(Later)
Remove all of these items in the following order:
iTunes
Apple Software Update
Apple Mobile Device Support (If this won't uninstall press on)
Bonjour
Apple Application Support
Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
See also HT1925: Removing and Reinstalling iTunes for Windows XP or HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
Should you get the error iTunes.exe - Entry Point Not Found after the above reinstall then copy QTMovieWin.dll from:
C:\Program Files (x86)\Common Files\Apple\Apple Application Support
and paste into:
C:\Program Files (x86)\iTunes
The above paths would be for a 64-bit machine. Hopefully the same fix with the " (x86)" omitted would work on 32-bit systems with the same error.
tt2 -
I cannot access the iTunes store from any of my computers. When I updated to v. 10.7 it made my laptop unable to access just like with my two desktops. I have installed and uninstalled numerous times.
Nothing happens. iTunes just hangs up every time, saying "Accessing iTunes Store." It does that for a very, very long time, then nothing. Here is what happens when I run diagnostics.
Microsoft Windows 7 x64 Home Premium Edition Service Pack 1 (Build 7601)
LENOVO Lenovo H420
iTunes 10.7.0.21
QuickTime not available
FairPlay 2.2.19
Apple Application Support 2.2.2
iPod Updater Library 10.0d2
CD Driver 2.2.3.0
CD Driver DLL 2.1.3.1
Apple Mobile Device 6.0.0.59
Apple Mobile Device Driver 1.62.0.0
Bonjour 3.0.0.10 (333.10)
Gracenote SDK 1.9.6.502
Gracenote MusicID 1.9.6.115
Gracenote Submit 1.9.6.143
Gracenote DSP 1.9.6.45
iTunes Serial Number 0015AF9C035D73D0
Current user is not an administrator.
The current local date and time is 2012-09-15 18:28:21.
iTunes is not running in safe mode.
WebKit accelerated compositing is enabled.
HDCP is supported.
Core Media is supported.
Video Display Information
Intel Corporation, Intel(R) HD Graphics Family
**** External Plug-ins Information ****
No external plug-ins installed.
**** Network Connectivity Tests ****
Network Adapter Information
Adapter Name: {EF6BBA91-21E3-44BD-828F-794CBBBFC89D}
Description: Intel(R) 82579V Gigabit Network Connection
IP Address: 192.168.1.10
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
DHCP Enabled: Yes
DHCP Server: 192.168.1.1
Lease Obtained: Sat Sep 15 17:52:30 2012
Lease Expires: Sun Sep 16 17:52:30 2012
DNS Servers: 192.168.1.1
Active Connection: LAN Connection
Connected: Yes
Online: Yes
Using Modem: No
Using LAN: Yes
Using Proxy: No
Firewall Information
Windows Firewall is off.
Connection attempt to Apple web site was unsuccessful.
The network connection timed out.
Basic connection to the store failed.
The network connection timed out.
Connection attempt to Gracenote server was successful.
The network connection timed out.
Last successful iTunes Store access was 2012-04-29 17:37:19.
**** Device Connectivity Tests ****
iPodService 10.7.0.21 (x64) is currently running.
iTunesHelper 10.7.0.21 is currently running.
Apple Mobile Device service 3.3.0.0 is currently running.
Universal Serial Bus Controllers:
Intel(R) 6 Series/C200 Series Chipset Family USB Enhanced Host Controller - 1C26. Device is working properly.
Intel(R) 6 Series/C200 Series Chipset Family USB Enhanced Host Controller - 1C2D. Device is working properly.
No FireWire (IEEE 1394) Host Controller found.
Connected Device Information:
Brooke, iPod touch (2nd generation) running firmware version 4.2.1
Serial Number: 9E******75J
Most Recent Devices Not Currently Connected:
iPod nano (6th Generation) running firmware version 1.2
Serial Number: DC*******DVY
iPhone 4S running firmware version 5.1.1
Serial Number: C8*******TF9
iPad 2 running firmware version 5.1.1
Serial Number: DK*******FHW
**** Device Sync Tests ****
Sync tests completed successfully.
<Edited by Host> -
Problem with installing and uninstalling applicati...
hi all,
I have a problem with installing or uninstalling apps on 808. When i try to install an application through Nokia suite or when trying to run the application file from the phone's memory the screen freezes and becomes unresponsive but the 3 phone buttons work just fine. I have to shut down the phone and the screen becomes responsive again. Anything available to help me wiith this situations as I cannot use any of the apps I have. Any help much appreciated.
Regards
AlexYou are not alone. Im also having the same issue because we do alot of install and uninstall apps. This is the bad point of symbian. But I tired to install the latest FP2 it will be slightly abit smoother now. So you have the latest version now but did you tired to restore any backup yet? It might be the setting on when you restore that affect it. The feezing should be shorten on FP2 but it will still remain there depending on the type of apps from what I experience.
I hope they will provide multiple function to uninstall apps since it will go through a long process to uninstall apps 1 by 1.
Reason is because some apps will go through process like preparing install, process install, finalising install which take away your control for that few seconds or a minute instead runnning in background mode. Its not convenient to uninstall more apps. -
TS1368 I cannot connect to the iTunes Store. I receive Error Code -1202. This problem began yesterday. I have been successfully connecting to the store for months on this PC. I am running Windows 7 and the Windows Security Center. Thanks for any help.
Hello alankilner,
And welcome to Apple Discussions!
Using Proxy: Yes
Try temporarily disabling this setting by following the steps outlined in this Apple support document.
http://support.apple.com/kb/TS1490
B-rock -
Fit the image to window width, window height and the window size
hi all
here we wrote the code for "fit the image to window width, window height and the window size". we are facing some problems in it. and all these operations have to perform even after zooming operations are done.if the below code doesnt satisfy kindly provide appropriate code .
thanks .
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.awt.image.BufferedImage;
import java.io.*;
import javax.imageio.ImageIO;
import javax.swing.*;
import java.io.File;
import javax.swing.filechooser.FileFilter;
import java.awt.geom.*;
public class DP extends JFrame implements ActionListener,
MouseListener,
MouseMotionListener {
private final int PEN_OP = 1;
private final int CLEAR_OP = 2;
private int radius;
private int radius1;
private int mousex = 0;
private int mousey = 0;
private int prevx = 0;
private int prevy = 0;
private boolean initialFreeHand = true;
private boolean initialLine = true;
private boolean initialEraser = true;
private int Orx = 0;
private int Ory = 0;
private int OrWidth = 0;
private int OrHeight = 0;
private int drawX = 0;
private int drawY = 0;
private int polyX = 0;
private int polyY = 0;
private int eraserLength = 5;
private int udefRedValue = 255;
private int udefGreenValue = 255;
private int udefBlueValue = 255;
private int opStatus = PEN_OP;
private int colorStatus = 1;
private double zoomPercentage=10;
private Color mainColor = new Color(0, 0, 0);
private Color xorColor = new Color(255, 255, 255);
private Color userDefinedColor =
new Color(udefRedValue, udefGreenValue,udefBlueValue);
private JButton openButton = new JButton("open");
private JButton closeButton = new JButton("close");
private JButton zoominButton = new JButton("ZoomIn");
private JButton zoomoutButton = new JButton("ZoomOut");
private JButton zoomto100Button = new JButton("ZoomTo100");
private JButton fwwButton = new JButton("Fit window width");
private JButton fwhButton = new JButton("Fit window height");
private JButton fwButton = new JButton("Fit the window");
private JButton clearButton = new JButton("Clear");
private JTextField colorStatusBar = new JTextField(20);
private JTextField opStatusBar = new JTextField(20);
private JTextField mouseStatusBar = new JTextField(10);
private JPanel controlPanel = new JPanel(new GridLayout(18, 1, 0, 0));
JToolBar jToolbar = new JToolBar();
private Container container;
private JScrollBar horizantalSlide=new JScrollBar();
public BufferedImage image;
BufferedImage bgImage;
// public ImageIcon icon=null;
JFileChooser fileChooser;
DrawPanel drawPanel = new DrawPanel(bgImage,zoomPercentage);
public DP() {
super("WhiteBoard");
fileChooser = new JFileChooser(".");
container = getContentPane();
container.setBackground(Color.white);
container.setLayout(new BorderLayout());
container.add(jToolbar,BorderLayout.NORTH);
container.add(horizantalSlide);
jToolbar.add(openButton);
jToolbar.add(closeButton);
jToolbar.add(zoominButton);
jToolbar.add(zoomoutButton);
jToolbar.add(zoomto100Button);
jToolbar.add(fwwButton);
jToolbar.add(fwhButton);
jToolbar.add(fwButton);
jToolbar.add(clearButton);
colorStatusBar.setEditable(false);
opStatusBar.setEditable(false);
mouseStatusBar.setEditable(false);
controlPanel.setBackground(Color.white);
drawPanel.setBackground(Color.white);
container.add(controlPanel, "West");
container.add(drawPanel, "Center");
openButton.addActionListener(this);
closeButton.addActionListener(this);
zoominButton.addActionListener(this);
zoomoutButton.addActionListener(this);
zoomto100Button.addActionListener(this);
fwwButton.addActionListener(this);
fwhButton.addActionListener(this);
fwButton.addActionListener(this);
clearButton.addActionListener(this);
drawPanel.addMouseMotionListener(this);
drawPanel.addMouseListener(this);
addMouseListener(this);
addMouseMotionListener(this);
opStatusBar.setText("FreeHand");
colorStatusBar.setText("Black");
public void actionPerformed(ActionEvent e) {
if(e.getActionCommand().equals("open"))
showDialog();
if(e.getActionCommand().equals("close"))
closeDialog();
if(e.getActionCommand().equals("ZoomIn"))
drawPanel.zoom(1);
if(e.getActionCommand().equals("ZoomOut"))
drawPanel.zoom(-1);
if(e.getActionCommand().equals("ZoomTo100"))
drawPanel.zoom(+10);
if(e.getActionCommand().equals("Fit window width"))
drawPanel.fitwindowwidth();
if(e.getActionCommand().equals("Fit window height"))
drawPanel.fitwindowheight();
if(e.getActionCommand().equals("Fit the window"))
drawPanel.fitthewindow();
if (e.getActionCommand() == "Clear")
opStatus = CLEAR_OP;
switch (opStatus) {
case CLEAR_OP:
clearPanel();
private void showDialog() {
if(fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile();
try {
bgImage = ImageIO.read(file);
} catch(IOException e) {
System.out.println("IO error: " + e.getMessage());
clearPanel();
private void closeDialog() {
drawPanel.setVisible(false);
drawPanel.repaint();
public void clearPanel() {
opStatusBar.setText("Clear");
Graphics g = image.getGraphics();
g.setColor(drawPanel.getBackground());
g.fillRect(0, 0, drawPanel.getBounds().width, drawPanel.getBounds().height);
if(bgImage != null)
g.drawImage(bgImage, 0, 0, this);
g.dispose();
drawPanel.repaint();
public boolean mouseHasMoved(MouseEvent e) {
return (mousex != e.getX() || mousey != e.getY());
public void setActualBoundry() {
if (mousex < Orx || mousey < Ory) {
if (mousex < Orx) {
OrWidth = Orx - mousex;
drawX = Orx - OrWidth;
} else {
drawX = Orx;
OrWidth = mousex - Orx;
if (mousey < Ory) {
OrHeight = Ory - mousey;
drawY = Ory - OrHeight;
} else {
drawY = Ory;
OrHeight = mousey - Ory;
} else {
drawX = Orx;
drawY = Ory;
OrWidth = mousex - Orx;
OrHeight = mousey - Ory;
public void setGraphicalDefaults(MouseEvent e) {
mousex = e.getX();
mousey = e.getY();
prevx = e.getX();
prevy = e.getY();
Orx = e.getX();
Ory = e.getY();
drawX = e.getX();
drawY = e.getY();
OrWidth = 0;
OrHeight = 0;
public void mouseDragged(MouseEvent e) {
updateMouseCoordinates(e);
switch (opStatus) {}
public void mouseReleased(MouseEvent e) {
updateMouseCoordinates(e);
switch (opStatus) {}
public void mouseEntered(MouseEvent e) {
updateMouseCoordinates(e);
public void updateMouseCoordinates(MouseEvent e) {
String xCoor = "";
String yCoor = "";
if (e.getX() < 0)
xCoor = "0";
else {
xCoor = String.valueOf(e.getX());
if (e.getY() < 0)
xCoor = "0";
else {
yCoor = String.valueOf(e.getY());
mouseStatusBar.setText("x:" + xCoor + " y:" + yCoor);
public void mouseClicked(MouseEvent e) { updateMouseCoordinates(e); }
public void mouseExited(MouseEvent e) { updateMouseCoordinates(e); }
public void mouseMoved(MouseEvent e) { updateMouseCoordinates(e); }
public void mousePressed(MouseEvent e) { updateMouseCoordinates(e); }
public static void main(String[] args) {
DP wb = new DP();
wb.setDefaultCloseOperation(EXIT_ON_CLOSE);
wb.setSize(1024,740);
wb.setVisible(true);
private class DrawPanel extends JPanel {
private double m_zoom = 1.0;
private double m_zoomPercentage;
private BufferedImage m_image;
double theta = 0;
double thetaInc = Math.PI/2;
public DrawPanel(BufferedImage imageb,double zoomPercentage) {
m_image = imageb;
m_zoomPercentage = zoomPercentage / 100;
protected void paintComponent(Graphics g) {
Graphics2D g2d=(Graphics2D)g;
if(image == null)
initImage();
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
double x = (1.0 - m_zoom)*getWidth()/2.0;
double y = (1.0 - m_zoom)*getHeight()/2.0;
AffineTransform at = AffineTransform.getTranslateInstance(x, y);
at.rotate(theta,m_zoom*getWidth()/2,m_zoom*getHeight()/2);
at.scale(m_zoom, m_zoom);
g2d.drawRenderedImage(image, at);
public void zoom(int inc) {
m_zoom += inc * m_zoomPercentage;
repaint();
public void fitwindowwidth()
int w1=drawPanel.getWidth();
int h1=drawPanel.getHeight();
BufferedImage image2=image.getScaledInstance(w1,h1,Image.SCALE_DEFAULT);
drawPanel.setPreferredSize(new java.awt.Dimension(100,image2.getImage().getHeight(null)));
drawPanel.repaint();
public void fitwindowheight()
BufferedImage image2=image.getScaledInstance(500,680,1);
drawPanel.setImage(iicon);
drawPanel.setPreferredSize(new java.awt.Dimension(100,image2.getImage().getHeight(null)));
drawPanel.repaint();
public void fitthewindow()
BufferedImage image2=image.getScaledInstance(1000,680,1);
drawPanel.setPreferredSize(new java.awt.Dimension(100,image2.getImage().getHeight(null)));
drawPanel.repaint();
private void initImage() {
int w = getWidth();
int h = getHeight();
image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = image.createGraphics();
g2.setPaint(getBackground());
g2.fillRect(0,0,w,h);
g2.dispose();
}thank you for giving reply.
your code is very helpful to us.but i couldn't integrate it in my code.here's my code.
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.awt.image.BufferedImage;
import java.io.*;
import javax.imageio.ImageIO;
import javax.swing.*;
import java.io.File;
import javax.swing.filechooser.FileFilter;
import java.awt.geom.*;
public class IS extends JFrame implements ActionListener,
MouseListener,
MouseMotionListener {
private final int PEN_OP = 1;
private final int CLEAR_OP = 2;
private final int DISTORT = 3;
private final int SCALE = 4;
private final int FIT = 5;
private final int FILL = 6;
int scaleMode = SCALE;
private int radius;
private int radius1;
private int mousex = 0;
private int mousey = 0;
private int prevx = 0;
private int prevy = 0;
private boolean initialFreeHand = true;
private boolean initialLine = true;
private boolean initialEraser = true;
private int Orx = 0;
private int Ory = 0;
private int OrWidth = 0;
private int OrHeight = 0;
private int drawX = 0;
private int drawY = 0;
private int polyX = 0;
private int polyY = 0;
private int eraserLength = 5;
private int udefRedValue = 255;
private int udefGreenValue = 255;
private int udefBlueValue = 255;
private int opStatus = PEN_OP;
private int colorStatus = 1;
private double zoomPercentage=10;
private Color mainColor = new Color(0, 0, 0);
private Color xorColor = new Color(255, 255, 255);
private Color userDefinedColor =
new Color(udefRedValue, udefGreenValue,udefBlueValue);
private JButton openButton = new JButton("open");
private JButton closeButton = new JButton("close");
private JButton zoominButton = new JButton("ZoomIn");
private JButton zoomoutButton = new JButton("ZoomOut");
private JButton zoomto100Button = new JButton("ZoomTo100");
private JButton fwwButton = new JButton("Fit window width");
private JButton fwhButton = new JButton("Fit window height");
private JButton fwButton = new JButton("Fit the window");
private JButton clearButton = new JButton("Clear");
private JTextField colorStatusBar = new JTextField(20);
private JTextField opStatusBar = new JTextField(20);
private JTextField mouseStatusBar = new JTextField(10);
private JPanel controlPanel = new JPanel(new GridLayout(18, 1, 0, 0));
JToolBar jToolbar = new JToolBar();
private Container container;
private JScrollBar horizantalSlide=new JScrollBar();
public BufferedImage image;
BufferedImage bgImage;
// public ImageIcon icon=null;
JFileChooser fileChooser;
DrawPanel drawPanel = new DrawPanel(bgImage,zoomPercentage);
public IS() {
super("WhiteBoard");
fileChooser = new JFileChooser(".");
container = getContentPane();
container.setBackground(Color.white);
container.setLayout(new BorderLayout());
container.add(jToolbar,BorderLayout.NORTH);
container.add(horizantalSlide);
jToolbar.add(openButton);
jToolbar.add(closeButton);
jToolbar.add(zoominButton);
jToolbar.add(zoomoutButton);
jToolbar.add(zoomto100Button);
jToolbar.add(fwwButton);
jToolbar.add(fwhButton);
jToolbar.add(fwButton);
jToolbar.add(clearButton);
colorStatusBar.setEditable(false);
opStatusBar.setEditable(false);
mouseStatusBar.setEditable(false);
controlPanel.setBackground(Color.white);
drawPanel.setBackground(Color.white);
container.add(controlPanel, "West");
container.add(drawPanel, "Center");
openButton.addActionListener(this);
closeButton.addActionListener(this);
zoominButton.addActionListener(this);
zoomoutButton.addActionListener(this);
zoomto100Button.addActionListener(this);
fwwButton.addActionListener(this);
fwhButton.addActionListener(this);
fwButton.addActionListener(this);
clearButton.addActionListener(this);
drawPanel.addMouseMotionListener(this);
drawPanel.addMouseListener(this);
addMouseListener(this);
addMouseMotionListener(this);
opStatusBar.setText("FreeHand");
colorStatusBar.setText("Black");
public void actionPerformed(ActionEvent e) {
if(e.getActionCommand().equals("open"))
showDialog();
if(e.getActionCommand().equals("close"))
closeDialog();
if(e.getActionCommand().equals("ZoomIn"))
drawPanel.zoom(1);
if(e.getActionCommand().equals("ZoomOut"))
drawPanel.zoom(-1);
if(e.getActionCommand().equals("ZoomTo100"))
drawPanel.zoom(+10);
if(e.getActionCommand().equals("Fit window width"))
//drawPanel.fitwindowwidth();
drawPanel.scaleImage(0,0,0,0);
if(e.getActionCommand().equals("Fit window height"))
drawPanel.scaleImage(0,0,0,0);
if(e.getActionCommand().equals("Fit the window"))
drawPanel.scaleImage(0,0,0,0);
if (e.getActionCommand() == "Clear")
opStatus = CLEAR_OP;
switch (opStatus) {
case CLEAR_OP:
clearPanel();
private void showDialog() {
if(fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile();
try {
bgImage = ImageIO.read(file);
} catch(IOException e) {
System.out.println("IO error: " + e.getMessage());
clearPanel();
private void closeDialog() {
drawPanel.setVisible(false);
drawPanel.repaint();
public void clearPanel() {
opStatusBar.setText("Clear");
int w = image.getWidth();
int h = image.getHeight();
Graphics g = image.getGraphics();
g.setColor(drawPanel.getBackground());
g.fillRect(0, 0, w, h);
if(bgImage != null) {
int x = (w - bgImage.getWidth())/2;
int y = (h - bgImage.getHeight())/2;
g.drawImage(bgImage, x, y, this);
g.dispose();
drawPanel.repaint();
public boolean mouseHasMoved(MouseEvent e) {
return (mousex != e.getX() || mousey != e.getY());
public void setActualBoundry() {
if (mousex < Orx || mousey < Ory) {
if (mousex < Orx) {
OrWidth = Orx - mousex;
drawX = Orx - OrWidth;
} else {
drawX = Orx;
OrWidth = mousex - Orx;
if (mousey < Ory) {
OrHeight = Ory - mousey;
drawY = Ory - OrHeight;
} else {
drawY = Ory;
OrHeight = mousey - Ory;
} else {
drawX = Orx;
drawY = Ory;
OrWidth = mousex - Orx;
OrHeight = mousey - Ory;
public void setGraphicalDefaults(MouseEvent e) {
mousex = e.getX();
mousey = e.getY();
prevx = e.getX();
prevy = e.getY();
Orx = e.getX();
Ory = e.getY();
drawX = e.getX();
drawY = e.getY();
OrWidth = 0;
OrHeight = 0;
public void mouseDragged(MouseEvent e) {
updateMouseCoordinates(e);
switch (opStatus) {
public void mouseReleased(MouseEvent e) {
updateMouseCoordinates(e);
switch (opStatus) {}
public void mouseEntered(MouseEvent e) {
updateMouseCoordinates(e);
public void updateMouseCoordinates(MouseEvent e) {
String xCoor = "";
String yCoor = "";
if (e.getX() < 0)
xCoor = "0";
else {
xCoor = String.valueOf(e.getX());
if (e.getY() < 0)
xCoor = "0";
else {
yCoor = String.valueOf(e.getY());
mouseStatusBar.setText("x:" + xCoor + " y:" + yCoor);
public void mouseClicked(MouseEvent e) { updateMouseCoordinates(e); }
public void mouseExited(MouseEvent e) { updateMouseCoordinates(e); }
public void mouseMoved(MouseEvent e) { updateMouseCoordinates(e); }
public void mousePressed(MouseEvent e) { updateMouseCoordinates(e); }
public static void main(String[] args) {
IS wb = new IS();
wb.setDefaultCloseOperation(EXIT_ON_CLOSE);
wb.setSize(1024,740);
wb.setVisible(true);
private class DrawPanel extends JPanel {
private double m_zoom = 1.0;
private double m_zoomPercentage;
private BufferedImage m_image;
double theta = 0;
double thetaInc = Math.PI/2;
public DrawPanel(BufferedImage imageb,double zoomPercentage) {
m_image = imageb;
m_zoomPercentage = zoomPercentage / 100;
protected void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2d=(Graphics2D)g;
if(image == null)
initImage();
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BICUBIC);
int w = getWidth();
int h = getHeight();
int iw = image.getWidth();
int ih = image.getHeight();
if(scaleMode == SCALE) {
double x = (w - m_zoom*iw)/2;
double y = (h - m_zoom*ih)/2;
AffineTransform at = AffineTransform.getTranslateInstance(x, y);
at.rotate(theta,m_zoom*getWidth()/2,m_zoom*getHeight()/2);
at.scale(m_zoom, m_zoom);
g2d.drawRenderedImage(image, at);
else {
scaleImage(w, h, iw, ih);
private void scaleImage( int w, int h, int iw, int ih) {
Graphics2D g2d = image.createGraphics();
double xScale = (double)w/iw;
double yScale = (double)h/ih;
AffineTransform at = new AffineTransform();
if(scaleMode == DISTORT) {
double x = (w - xScale*iw)/2;
double y = (h - yScale*ih)/2;
at.setToTranslation(x, y);
at.scale(xScale, yScale);
} else {
double scale = (scaleMode == FIT) ? Math.min(xScale, yScale)
: Math.max(xScale, yScale);
double x = (w - scale*iw)/2;
double y = (h - scale*ih)/2;
at.setToTranslation(x, y);
at.scale(scale, scale);
g2d.drawRenderedImage(image, at);
public void zoom(int inc) {
m_zoom += inc * m_zoomPercentage;
repaint();
private void initImage() {
int w = getWidth();
int h = getHeight();
image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = image.createGraphics();
g2.setPaint(getBackground());
g2.fillRect(0,0,w,h);
g2.dispose();
} -
Error on iTunes library file after installing and uninstalling 8.1
I downloaded 8.1 after being prompted. After installing 8.1, I could not synch my IPod. I uninstalled 8.1, reinstalled 8.02, and now I am getting this error.
Does anyone have any ideas on how to correct this? I have about 39 Gigs of music, and will have problems trying to restore this to a hard drive.I'm not sure if this is the right place to ask this; i'm new; after i installed the latest version of itunes, i get a library error message each time i open it up; it tells me i have an invalid library, then it creates a backup and calls it 'damaged1'; i have installed and uninstalled itunes 3 times now; each time, i erase all traces of past libraries, so that i start 'new'; the first time i open up itunes, i don't get the error message; i do absolutely nothing with the program, just close it; wait 5 seconds; open it up, and immediately i get the error message, and it creates a 'damaged1' back up; each time i open it, it creates a newer backup, and keeps adding 'movie, genius, dj' etc to my playlist; if i open it 10 times, i've got 10 of all these folders - HELP ME!
-
after downloading new version of Firefox 4 I am unable to use touch pad for scrolling. I have tried installing and uninstalling the new version but this problem has always been occuring. I do not know how to fix this problem so I always return to the old version.
If you have problems with updating or with the permissions then easiest is to download the full version and trash the currently installed version to do a clean install of the new version.
Download a new copy of the Firefox program and save the DMG file to the desktop
* Firefox 5.0.x: http://www.mozilla.com/en-US/firefox/all.html
* Trash the current Firefox application to do a clean (re-)install
* Install the new version that you have downloaded
Your profile data is stored elsewhere in the Firefox Profile Folder, so you won't lose your bookmarks and other personal data.
* http://kb.mozillazine.org/Profile_folder_-_Firefox
Maybe you are looking for
-
Hi, Apple Mail provides a function to create sub-folders within my mailbox so that I can group emails of similar subjects or from the same sender. My service provider only provides POP email protocol and the New Folder button does not appear in my Ap
-
Hi everyone, I just received my refurbished iPod Touch 2 days ago and it came with 1.1.5 with the Jan Software Upgrade. I plugged it into iTunes and successfully synced my stuff in and also purchased the 2.1 update for US$9++. The download of the upd
-
Different filters to data in 2 different columns
Oracle BI 11g Hi, I have 1 fact table Sales (ID, Date, VersionID, Count) and 2 dimension table - Calendar (Date, Year, Month, Week, Day, ...), Versions (ID, Name). I've created Time Hierarchy on table Calendar, so I can use AGO function. I made new l
-
Batch no. manual creation in return
Hi All, Isn't the batch no. creation automatically happened when performing return some items ? I use SBO 2005A SP 01 PL 29. I have to create batch number manually. I thought it is automated created when perform return item, serial no. is okay. Rgds,
-
WHAT ARE THE FORMS (SCRIPTS) WHICH ARE NOT PROVIDED BY STANDARD SAP?
WHAT ARE THE FORMS (SCRIPTS) WHICH ARE NOT PROVIDED BY STANDARD SAP?