Ok I am getting different speeds in every program I use (p6n sli)
Post says one thing, cpu-z, dual core center, and clock gen says another.
Which should I trust exactly?
I have an e6600, is a 1480 MHz fsb pretty good at stock voltage to start with? Im afraid to go any further, as I am getting a myriad of different information on exactly what I am doing here.
I took some pics for youze guys
I dug up an old pic of the inside with some older components, and thank god that 1950xt died on me a week after I got it. I like my 8800 gtx ALOT more. But you can see how tight the fit is gonna be
I need a new case, but I have sentimental attackment to this one and the stickers thereon. I wish it didnt look like the vegas strip at night though, between my OCZ psu and its horrific blue light, the light on the fan, the two on the p6n, the hd and power leds, the optical mouse, and speakers power light. I could land a plane in this room at night.
*Edit! forgot my favorite sticker. dont laugh, I know its a remedial sound card, but its 7.1, it does my movies and mp3s just fine.
Similar Messages
-
I am unable to burn mp3 audio files to cd.Every time it says failed due to media write error.I have tried different speeds.Can anyone help pls?
There are several different incompatible media sold as writeable CDs. You MUST match the media to the abilities of your drive.
I was flummoxed by buying 8x media when my drive was a 2x drive. I needed the other type, and there was nothing helpful in the diagnostics or the packaging that helped me understand that.
EDIT: There is an interesting helpful feature buried in System Profiler ... (read the last two lines of the report):
About this Mac > ( More Info ) > Report > Disc burning -
Getting different result while running Dashboard SP Using Temporary table?
Hi Experts
I am getting different result when I run my dashboard procedure I am using temporary table with "ON COMMIT PRESERVE ROWS", below is the information
I am running my attendance dashboard procedure which will display the employee attendance status based IN and OUT punches the status like AA-full day absent, GG-Full day Present, AG-First half absent,GA-Second half absent. Now when I run the first time my procedure for first time I am getting status AA even though IN and OUT timings are correct and if run it again then it is displaying the status for same employee as GG
I didn't understand the problem where it is effecting the statusChakravarthyDBA wrote:
It is procedure which will display the employee status, back end I am storing the procedure result in Temporary table with "ON COMMIT PRESERVE ROWS", when I run the procedure first time it is showing wrong information when I run it again second time then it is showing correct information. I don't know why the status is changing.
first time employee status is AA --Full day absent and Second time is GG--Full day present (in both cases IN and OUT timings are correct only)
is it effecting due to temporary table?
So, you have a GTT and you're doing "something" with it and that "something" isn't what you expect.
I've about summed up what you've posted and given us to work with. If you have specific examples please do share. Without them we're going to be of very little use to you.
If you aren't getting the results you expect, it stands to reason that
1) you don't understand the outputs you are supposed to be getting
2) you have a bug in the code developed
Please stop and think about this, pretend you are the one trying to help out. You've been given little to no information about a system you've never seen before. You need to explain your situation as you would if you brought someone in to your shop to show them this problem you are having ... the rules don't change just because it's not face-face interaction.
Cheers, -
When I go to Settings -> Applications and click on 'mailto', I see 'Use Yahoo mail, Use Gmail, and Use other...'. I want to use the Go Daddy Workspace Webmail application, which like Yahoo & Gmail, is a web based program, but don't see any way to add that option. The 'Use other...' option is only looking for an executable file and it won't accept a web-based command.
I found an old thread about the same type of issue. I cannot be certain whether it still works or not. Feel free to checkout the thread [https://support.mozilla.org/en-US/questions/917427 here].
-
i recently purchased a 21.5 iMac with Yosemite (10.10.1) and was disappointed to discover that my CS6 programs are not functioning correctly. I am unable to use the "Save As" command when making changes to a JPEG file in Photoshop. The message I get says that either another program is using the file or it is locked and I don't have permission to execute that command. I'm experiencing a similar problem in Bridge when trying to move an unwanted file to the Trash. Again, I get a message telling me that i don't have permission to do this. Lastly, I'm unable to open any Camera Raw files. Any suggestions? I had no problems with the Mavericks OS on my old iMac and although it's much slower, I'm tempted to go back to using my old iMac. At this point, I feel as if I've just wasted $2300+ (tax included).
Back up all data before proceeding.
This procedure will unlock all your user files (not system files) and reset their ownership, permissions, and access controls to the default. If you've intentionally set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it, but you do need to follow the instructions below.
Step 1
If you have more than one user, and the one in question is not an administrator, then go to Step 2.
Triple-click anywhere in the following line on this page to select it:
sudo find ~ $TMPDIR.. -exec chflags -h nouchg,nouappnd,noschg,nosappnd {} + -exec chown -h $UID {} + -exec chmod +rw {} + -exec chmod -h -N {} + -type d -exec chmod -h +x {} + 2>&-
Copy the selected text to the Clipboard by pressing the key combination command-C.
Launch the built-in Terminal application in any of the following ways:
☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
☞ Open LaunchPad and start typing the name.
Paste into the Terminal window by pressing command-V. I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting.
You'll be prompted for your login password, which won't be displayed when you type it. Type carefully and then press return. You may get a one-time warning to be careful. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
The command may take several minutes to run, depending on how many files you have. Wait for a new line ending in a dollar sign ($) to appear, then quit Terminal.
Step 2 (optional)
Take this step only if you have trouble with Step 1, if you prefer not to take it, or if it doesn't solve the problem.
Start up in Recovery mode. When the OS X Utilities screen appears, select
Utilities ▹ Terminal
from the menu bar. A Terminal window will open. In that window, type this:
resetp
Press the tab key. The partial command you typed will automatically be completed to this:
resetpassword
Press return. A Reset Password window will open. You’re not going to reset a password.
Select your startup volume ("Macintosh HD," unless you gave it a different name) if not already selected.
Select your username from the menu labeled Select the user account if not already selected.
Under Reset Home Directory Permissions and ACLs, click the Reset button.
Select
▹ Restart
from the menu bar. -
I am having problems using my ipod 7g with Nike Fitness. When running when I press the button between the volume buttons, I get a different action almost every time. And usually I end up either turrning volume up very high or ending the workout. I need to be able to pause workout, and get spoken feedback regarding time, distance, and pace, that's all. I'm using a Griffin brand armband, that covers all of the buttons. I've read the online manual. no help. I'm just about ready to return it and go back to my 5th gen with its smaller song capacity and no blurry. Any help or suggestions very welcome.
Jeff:
I have had both good and bad experiences with Acronis True Image. I got the recent copy of ATI via a Newegg.com bundle. I haven't tried it yet on any Windows 7 editing systems. ATI installs some services that I would rather not have running in the background.
What made you change from ATI to ShadowProtect Desktop Edition?
Are you running Windows 7?
What do you see as advantages to running ShadowProtect Desktop Edition as opposed to Acronis True Image?
Thanks -
trying to burn CD but keep getting error message "The attempt to burn a disc failed. The burn failed because of a medium write error. Tried different speeds with no luck
The burn failed because of a medium write error. Tried different speeds with no luck
Then try to use a different brand of DVD or at least a different batch of DVD. The disk may be defective. -
Give two different speeds (FPS) in one file
Hey
Maybe you can help me on getting this ready: I want to
animate two different animations in one file, each with different
speeds. for example a menu loading at 12 fps and a bird suddently
flying away at 2 fps.
Thx for helping!
JoYou can make the clip that you want to play at 2 fps seem
that way by just making it longer. Alternately, you could use a
timed tween. -
Messagebox that displays a different randum number every 2 secs
well im having trouble with putting a messagebox that displays a different randum number every 2 secs and closes with a close button. it goes in the print menu option of this simple text editor,you shoud also be able to work in the background while this message box is been displayed.
import javax.swing.*;
import javax.swing.text.*;
import javax.swing.text.rtf.*;
import javax.swing.event.*;
import javax.swing.filechooser.*;
import javax.swing.undo.*;
import java.util.Timer;
import java.util.TimerTask;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import java.beans.*;
-------------------| Simple Text Editor example application using Java 1.3 with Swing |--------------
public class SimpleTextEditor extends JFrame
private JTextPane textpane;
private JMenuBar mb;
private JFileChooser chooser,picChooser;
private Hashtable actions;
private JPopupMenu popup;
private JMenuItem exit, newDoc, save, open, saveAs,print;
private About ab;
private StyledEditorKit edkit;
private RTFEditorKit rtfkit;
private DefaultStyledDocument doc;
private MyDocumentListener doclistener;
private MyUndoableEditListener undolistener;
//Useful variables
private String filename="untitled1.txt",filetype=".txt";
private File thisfile;
protected String FileFormats[],FileDescriptions[],PicFileFormats[],PicFileDescriptions[];
protected boolean DocumentIsUnedited=true, DocumentIsSaved=false;
public static int SQUARE=0,TRIANGLE=1,CIRCLE=2;
public String newline="\n";
protected UndoManager undo ;
protected UndoAction undoAction;
protected RedoAction redoAction;
// These are the actions used in the menus and on the toolbar
protected Action bold, italic, underline, alignleft, alignright, aligncentre;
protected Action spellchecker, alignjustify, more, cut, copy, paste, tools[];
public SimpleTextEditor()
super("SimpleTextEditor - untitled1.rtf");
this.setLocation(200,200);
this.setIconImage(getMyIcon("Icon.gif").getImage());
getContentPane().setLayout(new BorderLayout());
undo = new UndoManager();
//Set up the file formats and file choosers etc
FileFormats = new String[]{".rtf",".txt",".java",".bat"};
FileDescriptions = new String[]{"Rich Text Format Files","Text Files","Java Source Files","DOS Batch Files"};
PicFileFormats = new String[]{".gif",".bmp",".jpg"};
PicFileDescriptions = new String[]{"Gif Images","Bitmap Images","JPEG Images"};
chooser = new JFileChooser();
picChooser = new JFileChooser();
picChooser.setAccessory(new ImagePreview(picChooser));
javax.swing.filechooser.FileFilter defaultFilter = new SimpleFilter(FileFormats[0],FileDescriptions[0]);
javax.swing.filechooser.FileFilter defaultPicFilter = new SimpleFilter(PicFileFormats[0],PicFileDescriptions[0]);
for(int i=1;i<FileFormats.length;i++){
chooser.addChoosableFileFilter(new SimpleFilter(FileFormats,FileDescriptions[i]));
for(int i=1;i<PicFileFormats.length;i++){
picChooser.addChoosableFileFilter(new SimpleFilter(PicFileFormats[i],PicFileDescriptions[i]));
chooser.setFileFilter(defaultFilter);
picChooser.setFileFilter(defaultPicFilter);
File working = new File("C:/Documents");
if(!working.exists()){
working= new File("C:/MyDocuments");
if(!working.exists()) working = new File("C:/");
if(working.exists()) {
chooser.setCurrentDirectory(working);
picChooser.setCurrentDirectory(working);
// Set up Document object and Editor kits
doc = new DefaultStyledDocument();
edkit = new StyledEditorKit();
rtfkit = new RTFEditorKit();
// Set up Listener objects
doclistener= new MyDocumentListener();
undolistener= new MyUndoableEditListener();
doc.addDocumentListener(doclistener);
doc.addUndoableEditListener(undolistener);
//Set up main GUI content
textpane=new JTextPane(doc);
textpane.setPreferredSize(new Dimension(400,400));
textpane.setMinimumSize(new Dimension(400,400));
JScrollPane scroller=new JScrollPane(textpane);
scroller.setPreferredSize(new Dimension(400,400));
mb=new JMenuBar(); // Create a menu bar
JMenu File=new JMenu("File");
JMenu Help=new JMenu("Help");
//Sort out Actions etc
createActionTable(textpane);
createToolbarActions();
JMenu Style=createStyleMenu();
undoAction = new UndoAction();
redoAction = new RedoAction();
//Create Style, Edit and Format menus + Toolbar
JMenu Edit=createEditMenu();
JMenu Format=createFormatMenu();
JMenu Insert = createInsertMenu();
JToolBar toolbar = createToolbar();
getContentPane().add("North",toolbar);
// set up main menu items with ActionListeners
newDoc=new JMenuItem("New");
newDoc.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
newDoc();
exit=new JMenuItem("Exit");
exit.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
exit();
print=new JMenuItem("Print");
print.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
print();
save=new JMenuItem("Save");
save.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
save();
saveAs=new JMenuItem("Save As...");
saveAs.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
saveas();
open=new JMenuItem("Open...");
open.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
open();
JMenuItem about=new JMenuItem("About");
about.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
ab=new About(SimpleTextEditor.this);
ab.show();
ab.setLocation(400,300);
// Create the popup menu
popup = createEditMenu().getPopupMenu();
popup.addSeparator();
popup.add(createStyleMenu());
popup.add(createFormatMenu());
textpane.add(popup);
// set up Help and File menus
Help.add(about);
File.add(newDoc);
File.add(open);
File.add(print);
File.add(save);
File.add(saveAs);
File.addSeparator();
File.add(exit);
// add the menus to the menubar
mb.add(File);
mb.add(Edit);
mb.add(Format);
mb.add(Style);
mb.add(Insert);
mb.add(Help);
this.setJMenuBar(mb);
getContentPane().add("Center",scroller);
// Add mouse Listener to the textpane for popup events
textpane.addMouseListener(new MouseAdapter(){
public void mousePressed(MouseEvent e)
if(e.isPopupTrigger())
popup.show(textpane, e.getX(), e.getY());
e.consume();
public void mouseReleased(MouseEvent e)
if(e.isPopupTrigger())
popup.show(textpane, e.getX(), e.getY());
e.consume();
//-----------------| Main active methods |------------------
public void exit()// Main Exit method
if(DocumentIsUnedited){//Check that document is saved/unedited etc
dispose();
setVisible(false);
System.exit(0);
else{
switch(showNotSavedDialog("Exit")){
case JOptionPane.YES_OPTION: save(); exit(); break;
case JOptionPane.NO_OPTION: DocumentIsUnedited=true;exit();break;
case JOptionPane.CANCEL_OPTION: break;
public void newDoc()//Method to create new documents
if(DocumentIsUnedited){
initDoc();
filename="untitled.txt";
filetype=".txt";
resetTitle();
else
switch(showNotSavedDialog("New Document")){
case JOptionPane.YES_OPTION: save(); newDoc(); break;
case JOptionPane.NO_OPTION: DocumentIsUnedited=true;newDoc();break;
case JOptionPane.CANCEL_OPTION: break;
private void initDoc()// Helper method to initialize a new document
doc = null;
doc = (DefaultStyledDocument)edkit.createDefaultDocument();
doc.addDocumentListener(doclistener);
textpane.setStyledDocument(doc);
public void print()
new TimerTestFrame();
class TimerTestFrame extends JFrame
Timer timer;
TimerTestFrame()
super();
timer = new Timer(true);
TimerTask task = new MessageTimer(TimerTestFrame.this);
timer.schedule(task,2000,2000);
class MessageTimer extends TimerTask
Component parent;
public MessageTimer(Component parent)
this.parent = parent;
public void run()
int randnum = (1 +(int)(Math.random()*10));
JOptionPane.showMessageDialog(parent,""+randnum,"Timer Message",JOptionPane.INFORMATION_MESSAGE);
public void saveas()
int n = chooser.showSaveDialog(this);
if(n==0){
filename=chooser.getSelectedFile().getName();
boolean ext = false;
setFiletype();
thisfile = new File(chooser.getCurrentDirectory(),filename);
DocumentIsSaved=true;
save();
resetTitle();
repaint();
public void save()// Save method. Used by "Save As..." as well
if( DocumentIsSaved)
try
FileOutputStream out = new FileOutputStream(thisfile);
if((filetype.equals(".rtf"))||(filetype.equals(".doc"))){
rtfkit.write(out,doc,0,doc.getLength());
else edkit.write(out,doc,0,doc.getLength());
catch(Exception e)
System.out.println(""+e.getMessage()+"");
DocumentIsUnedited=true;
else saveas();
public void open()// Find a file and read it into the document
if(DocumentIsUnedited){
int n = chooser.showOpenDialog(this); // get the outcome of the dialog
if(n==0){
File file = chooser.getSelectedFile();
filename=chooser.getName(file);
setFiletype();
resetTitle();
initDoc();
try
FileInputStream in= new FileInputStream(file);
if(filetype.equals(".rtf")){
rtfkit.read(in,doc,0);
edkit.read(in,doc,0);
catch(Exception e)
System.out.println(""+e.getMessage()+"");
thisfile= new File(chooser.getCurrentDirectory(),chooser.getSelectedFile().getName());
DocumentIsUnedited=true;
DocumentIsSaved=true;
resetTitle();
repaint();
else
switch(showNotSavedDialog("Open")){
case JOptionPane.YES_OPTION: save(); open(); break;
case JOptionPane.NO_OPTION: DocumentIsUnedited=true; open(); break;
case JOptionPane.CANCEL_OPTION: break;
private void setFiletype()// Helper method to get the filetype of saved/opened documents
filetype=null;
for(int i=0;i<FileFormats.length;i++){
if(filename.toLowerCase().endsWith(FileFormats[i])) filetype = FileFormats[i];
else{
for(i=0;i<filename.length();i++){
if(filename.toLowerCase().charAt(i)=='.')
filetype=filename.substring(i);
if(filetype==null) filetype=".txt";
private void resetTitle()
this.setTitle("SimpleTextEditor - "+filename);
private ImageIcon getMyIcon(String filename){
ImageIcon pic = new ImageIcon("Images/"+filename);
return pic;
private int showNotSavedDialog(String title)// Helper method to create "Save? Yes/No/Cancel" dialogs
int n = JOptionPane.showConfirmDialog(this,"The last document has not been saved. \nDo you want to save it first?",
title,
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE);
return n;
//-----------------| Listeners and Helper classes |----------------
protected class MyDocumentListener implements DocumentListener
public void insertUpdate(DocumentEvent e) {
SimpleTextEditor.this.DocumentIsUnedited=false;
public void removeUpdate(DocumentEvent e) {
SimpleTextEditor.this.DocumentIsUnedited=false;
public void changedUpdate(DocumentEvent e) {
SimpleTextEditor.this.DocumentIsUnedited=false;
protected class MyUndoableEditListener implements UndoableEditListener {
public void undoableEditHappened(UndoableEditEvent e) {
//Remember the edit and update the menus.
undo.addEdit(e.getEdit());
undoAction.updateUndoState();
redoAction.updateRedoState();
//Helper class for FileFilter, allows a description to be assigned to a filetype
protected class SimpleFilter extends javax.swing.filechooser.FileFilter
String type,des;
public SimpleFilter(String type, String des)
this.des=des;
this.type=type;
public boolean accept(File f){
if(f.isDirectory())return true;
else{
if(f.getName().toLowerCase().endsWith(type)) return true;
else return false;
public String getDescription(){
return des;
//------------| Methods to help create menus and toolbar |--------------
protected JMenu createStyleMenu()
JMenu menu = new JMenu("Style");
menu.add(bold);
menu.add(italic);
menu.add(underline);
menu.addSeparator();
menu.add(new StyledEditorKit.FontSizeAction("12", 12));
menu.add(new StyledEditorKit.FontSizeAction("14", 14));
menu.add(new StyledEditorKit.FontSizeAction("18", 18));
menu.addSeparator();
menu.add(new StyledEditorKit.FontFamilyAction("Serif","Serif"));
menu.add(new StyledEditorKit.FontFamilyAction("SansSerif","SansSerif"));
menu.addSeparator();
Action red = new StyledEditorKit.ForegroundAction("Red", new Color(255,0,0));
red.putValue(Action.SMALL_ICON,getMyIcon("red.gif"));
menu.add(red);
Action green = new StyledEditorKit.ForegroundAction("Green", new Color(0,150,0));
green.putValue(Action.SMALL_ICON,getMyIcon("green.gif"));
menu.add(green);
Action blue = new StyledEditorKit.ForegroundAction("Blue", new Color(0,50,150));
blue.putValue(Action.SMALL_ICON,getMyIcon("blue.gif"));
menu.add(blue);
Action black = new StyledEditorKit.ForegroundAction("Black", new Color(0,0,0));
black.putValue(Action.SMALL_ICON,getMyIcon("black.gif"));
menu.add(black);
menu.add(more);
return menu;
protected JMenu createEditMenu() {
JMenu menu = new JMenu("Edit");
menu.add(undoAction);
menu.add(redoAction);
menu.addSeparator();
menu.add(cut);
menu.add(copy);
menu.add(paste);
menu.addSeparator();
Action selectall=getActionByName(DefaultEditorKit.selectAllAction);
selectall.putValue(Action.NAME, "Select All");
menu.add(selectall);
return menu;
protected JMenu createFormatMenu(){
JMenu menu = new JMenu("Format");
menu.add(spellchecker);
menu.add(alignleft);
menu.add(alignright);
menu.add(aligncentre);
menu.add(alignjustify);
return menu;
protected JMenu createInsertMenu(){
JMenu menu = new JMenu("Insert");
Action insertimage = new InsertImageAction(this);
menu.add(insertimage);
Action insertdate = new InsertDateAction();
menu.add(insertdate);
Action insertline = new InsertLineAction();
menu.add(insertline);
JMenu bullets =new JMenu("Bullet Points");
bullets.add(new InsertBulletAction(CIRCLE,"Circle"));
bullets.add(new InsertBulletAction(TRIANGLE,"Triangle"));
bullets.add(new InsertBulletAction(SQUARE,"Square"));
menu.add(bullets);
return menu;
public JToolBar createToolbar(){
JToolBar bar= new JToolBar();
JButton newbutton=new JButton(getMyIcon("new.gif"));
newbutton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
newDoc();
bar.add(newbutton);
JButton savebutton=new JButton(getMyIcon("save.gif"));
savebutton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
save();
bar.add(savebutton);
JButton openbutton=new JButton(getMyIcon("open.gif"));
openbutton.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
open();
bar.add(openbutton);
bar.addSeparator();
for(int i=0;i<tools.length;i++){
JButton button=new JButton();
button.setAction(tools[i]);
button.setIcon(getMyIcon(tools[i].getValue(Action.NAME)+".gif"));
button.setText("");
bar.add(button);
if((i==2)||(i==6))bar.addSeparator();
return bar;
public void createToolbarActions(){
bold = new StyledEditorKit.BoldAction();
bold.putValue(Action.NAME, "Bold");
italic = new StyledEditorKit.ItalicAction();
italic.putValue(Action.NAME, "Italic");
underline = new StyledEditorKit.UnderlineAction();
underline.putValue(Action.NAME, "Underline");
more = new MoreColorsAction();
cut = getActionByName(DefaultEditorKit.cutAction);
cut.putValue(Action.NAME, "Cut");
copy = getActionByName(DefaultEditorKit.copyAction);
copy.putValue(Action.NAME, "Copy");
paste = getActionByName(DefaultEditorKit.pasteAction);
paste.putValue(Action.NAME, "Paste");
alignleft = new StyledEditorKit.AlignmentAction("Left Justify",StyleConstants.ALIGN_LEFT);
alignright = new StyledEditorKit.AlignmentAction("Right Justify",StyleConstants.ALIGN_RIGHT);
aligncentre = new StyledEditorKit.AlignmentAction("Align Centre",StyleConstants.ALIGN_CENTER);
alignjustify = new StyledEditorKit.AlignmentAction("Fully Justify",StyleConstants.ALIGN_JUSTIFIED);
spellchecker = new StyledEditorKit.AlignmentAction("Spell Checker",StyleConstants.ALIGN_JUSTIFIED);
tools = new Action[]{ cut, copy, paste, bold, italic, underline, more, alignleft, alignright, aligncentre, alignjustify, spellchecker };
// helper methods to enable menu creators to get their actions by name
private void createActionTable(JTextComponent textComponent) {
actions = new Hashtable();
Action[] actionsArray = textComponent.getActions();
for (int i = 0; i < actionsArray.length; i++) {
Action a = actionsArray[i];
actions.put(a.getValue(Action.NAME), a);
private Action getActionByName(String name) {
return (Action)(actions.get(name));
//----------------| Custom Actions |--------------------
class InsertImageAction extends AbstractAction {
protected SimpleTextEditor parent;
public InsertImageAction(SimpleTextEditor parent){
super("Image...");
this.parent=parent;
public void actionPerformed(ActionEvent e) {
int n = parent.picChooser.showOpenDialog(parent);
if(n==0){
String filename=picChooser.getSelectedFile().getName();
File file = new File(picChooser.getCurrentDirectory(),filename);
Icon pic = new ImageIcon(file.getAbsolutePath());
textpane.insertIcon(pic);
SimpleTextEditor.this.repaint();
class InsertDateAction extends AbstractAction {
public InsertDateAction(){
super("Date");
public void actionPerformed(ActionEvent ble) {
Calendar c= Calendar.getInstance();
String[] months= new String[]{"01","02","03","04","05","06","07","08","09","10","11","12"};
textpane.replaceSelection(c.get(c.DAY_OF_MONTH)+"/"+months[c.get(c.MONTH)]+"/"+c.get(c.YEAR));
class InsertLineAction extends AbstractAction {
public InsertLineAction(){
super("Horizontal line");
public void actionPerformed(ActionEvent e) {
Icon pic = new ImageIcon("Images/line.gif");
textpane.insertIcon(pic);
class InsertBulletAction extends AbstractAction {
protected int type;
protected String filenames[] = new String[]{"square.gif","triangle.gif","circle.gif"};
public InsertBulletAction(int type,String name){
super(name);
this.type=type;
this.putValue(SMALL_ICON,new ImageIcon("Images/"+filenames[type]));
public void actionPerformed(ActionEvent e) {
Icon pic = new ImageIcon("Images/"+filenames[type]);
textpane.insertIcon(pic);
textpane.replaceSelection(" ");
class MoreColorsAction extends AbstractAction {
public MoreColorsAction(){
super("More Colors");
public void actionPerformed(ActionEvent e){
AttributeSet as = textpane.getCharacterAttributes();
SimpleAttributeSet sas = new SimpleAttributeSet(as);
Color newColor = JColorChooser.showDialog(
SimpleTextEditor.this,
"CHere you go guys:
Peace!
import javax.swing.*;
import javax.swing.Timer;
import javax.swing.border.BevelBorder;
import javax.swing.text.*;
import javax.swing.text.rtf.*;
import javax.swing.event.*;
import javax.swing.filechooser.*;
import javax.swing.undo.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
import java.beans.*;
-------------------| Simple Text Editor example application using Java 1.3 with Swing |--------------
public class SimpleTextEditor extends JFrame
private JTextPane textpane;
private JMenuBar mb;
private JFileChooser chooser,picChooser;
private Hashtable actions;
private JPopupMenu popup;
private JMenuItem exit, newDoc, save, open, saveAs,print;
private About ab;
private StyledEditorKit edkit;
private RTFEditorKit rtfkit;
private DefaultStyledDocument doc;
private MyDocumentListener doclistener;
private MyUndoableEditListener undolistener;
//Useful variables
private String filename = "untitled1.txt",filetype = ".txt";
private File thisfile;
protected String FileFormats[],FileDescriptions[],PicFileFormats[],PicFileDescriptions[];
protected boolean DocumentIsUnedited = true, DocumentIsSaved = false;
public static int SQUARE = 0,TRIANGLE = 1,CIRCLE = 2;
public String newline = "\n";
protected UndoManager undo;
protected UndoAction undoAction;
protected RedoAction redoAction;
// These are the actions used in the menus and on the toolbar
protected Action bold, italic, underline, alignleft, alignright, aligncentre;
protected Action spellchecker, alignjustify, more, cut, copy, paste, tools[];
public SimpleTextEditor()
super("SimpleTextEditor - untitled1.rtf");
this.setLocation(200, 200);
this.setIconImage(getMyIcon("Icon.gif").getImage());
getContentPane().setLayout(new BorderLayout());
undo = new UndoManager();
//Set up the file formats and file choosers etc
FileFormats = new String[]{".rtf", ".txt", ".java", ".bat"};
FileDescriptions = new String[]{"Rich Text Format Files", "Text Files", "Java Source Files", "DOS Batch Files"};
PicFileFormats = new String[]{".gif", ".bmp", ".jpg"};
PicFileDescriptions = new String[]{"Gif Images", "Bitmap Images", "JPEG Images"};
chooser = new JFileChooser();
picChooser = new JFileChooser();
picChooser.setAccessory(new ImagePreview(picChooser));
javax.swing.filechooser.FileFilter defaultFilter = new SimpleFilter(FileFormats[0], FileDescriptions[0]);
javax.swing.filechooser.FileFilter defaultPicFilter = new SimpleFilter(PicFileFormats[0], PicFileDescriptions[0]);
for (int i = 1; i < FileFormats.length; i++)
chooser.addChoosableFileFilter(new SimpleFilter(FileFormats, FileDescriptions[i]));
for (int i = 1; i < PicFileFormats.length; i++)
picChooser.addChoosableFileFilter(new SimpleFilter(PicFileFormats[i], PicFileDescriptions[i]));
chooser.setFileFilter(defaultFilter);
picChooser.setFileFilter(defaultPicFilter);
File working = new File("C:/Documents");
if (!working.exists())
working = new File("C:/MyDocuments");
if (!working.exists()) working = new File("C:/");
if (working.exists())
chooser.setCurrentDirectory(working);
picChooser.setCurrentDirectory(working);
// Set up Document object and Editor kits
doc = new DefaultStyledDocument();
edkit = new StyledEditorKit();
rtfkit = new RTFEditorKit();
// Set up Listener objects
doclistener = new MyDocumentListener();
undolistener = new MyUndoableEditListener();
doc.addDocumentListener(doclistener);
doc.addUndoableEditListener(undolistener);
//Set up main GUI content
textpane = new JTextPane(doc);
textpane.setPreferredSize(new Dimension(400, 400));
textpane.setMinimumSize(new Dimension(400, 400));
JScrollPane scroller = new JScrollPane(textpane);
scroller.setPreferredSize(new Dimension(400, 400));
mb = new JMenuBar(); // Create a menu bar
JMenu File = new JMenu("File");
JMenu Help = new JMenu("Help");
//Sort out Actions etc
createActionTable(textpane);
createToolbarActions();
JMenu Style = createStyleMenu();
undoAction = new UndoAction();
redoAction = new RedoAction();
//Create Style, Edit and Format menus + Toolbar
JMenu Edit = createEditMenu();
JMenu Format = createFormatMenu();
JMenu Insert = createInsertMenu();
JToolBar toolbar = createToolbar();
getContentPane().add("North", toolbar);
// set up main menu items with ActionListeners
newDoc = new JMenuItem("New");
newDoc.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
newDoc();
exit = new JMenuItem("Exit");
exit.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
exit();
print = new JMenuItem("Print");
print.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
print();
save = new JMenuItem("Save");
save.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
save();
saveAs = new JMenuItem("Save As...");
saveAs.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
saveas();
open = new JMenuItem("Open...");
open.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
open();
JMenuItem about = new JMenuItem("About");
about.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
ab = new About(SimpleTextEditor.this);
ab.show();
ab.setLocation(400, 300);
// Create the popup menu
popup = createEditMenu().getPopupMenu();
popup.addSeparator();
popup.add(createStyleMenu());
popup.add(createFormatMenu());
textpane.add(popup);
// set up Help and File menus
Help.add(about);
File.add(newDoc);
File.add(open);
File.add(print);
File.add(save);
File.add(saveAs);
File.addSeparator();
File.add(exit);
// add the menus to the menubar
mb.add(File);
mb.add(Edit);
mb.add(Format);
mb.add(Style);
mb.add(Insert);
mb.add(Help);
this.setJMenuBar(mb);
getContentPane().add("Center", scroller);
// Add mouse Listener to the textpane for popup events
textpane.addMouseListener(new MouseAdapter()
public void mousePressed(MouseEvent e)
if (e.isPopupTrigger())
popup.show(textpane, e.getX(), e.getY());
e.consume();
public void mouseReleased(MouseEvent e)
if (e.isPopupTrigger())
popup.show(textpane, e.getX(), e.getY());
e.consume();
//-----------------| Main active methods |------------------
public void exit()// Main Exit method
if (DocumentIsUnedited)
{//Check that document is saved/unedited etc
dispose();
setVisible(false);
System.exit(0);
else
switch (showNotSavedDialog("Exit"))
case JOptionPane.YES_OPTION:
save();
exit();
break;
case JOptionPane.NO_OPTION:
DocumentIsUnedited = true;
exit();
break;
case JOptionPane.CANCEL_OPTION:
break;
public void newDoc()//Method to create new documents
if (DocumentIsUnedited)
initDoc();
filename = "untitled.txt";
filetype = ".txt";
resetTitle();
else
switch (showNotSavedDialog("New Document"))
case JOptionPane.YES_OPTION:
save();
newDoc();
break;
case JOptionPane.NO_OPTION:
DocumentIsUnedited = true;
newDoc();
break;
case JOptionPane.CANCEL_OPTION:
break;
private void initDoc()// Helper method to initialize a new document
doc = null;
doc = (DefaultStyledDocument) edkit.createDefaultDocument();
doc.addDocumentListener(doclistener);
textpane.setStyledDocument(doc);
public void print()
new TimerTestDialog(this);
class TimerTestDialog extends JDialog
TimerTestDialog(Frame parent)
super(parent);
setLocationRelativeTo(parent);
setupDialog();
setModal(false); // this will allow you to do still stuff with the main frame
* sorry, using a Timer instead of your original TimerTask - it's simpler
Timer t = new Timer(2000, ticker);
t.start();
private void setupDialog()
Container c = getContentPane();
c.setLayout(new BorderLayout());
c.add(getDisplayPanel(), BorderLayout.CENTER);
c.add(getButtonPanel(), BorderLayout.SOUTH);
setSize(300, 150);
setVisible(true);
private Component getDisplayPanel()
label = new JLabel("---", JLabel.CENTER);
label.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JPanel backing = new JPanel(new BorderLayout());
backing.add(label, BorderLayout.NORTH); // this will ensure the label doesn't go all tall
panel.add(backing, BorderLayout.CENTER);
return panel;
private Component getButtonPanel()
JPanel panel = new JPanel(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
JPanel backing = new JPanel(new BorderLayout());
JButton closeButton = new JButton("close");
closeButton.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
dispose();
backing.add(closeButton, BorderLayout.NORTH);
panel.add(backing, BorderLayout.EAST);
return panel;
private ActionListener ticker = new ActionListener()
public void actionPerformed(ActionEvent e)
label.setText(String.valueOf(getRandomNumber()));
private int getRandomNumber()
return r.nextInt(10) + 1; // shift from 0-9 to 1-10
private JLabel label;
* NOTE - this is the best way to use random stuff in java. if you use instance members
* you can sometimes get the same result each time. not really sure how that works but
* i've seen it happen
private static Random r = new Random();
public void saveas()
int n = chooser.showSaveDialog(this);
if (n == 0)
filename = chooser.getSelectedFile().getName();
boolean ext = false;
setFiletype();
thisfile = new File(chooser.getCurrentDirectory(), filename);
DocumentIsSaved = true;
save();
resetTitle();
repaint();
public void save()// Save method. Used by "Save As..." as well
if (DocumentIsSaved)
try
FileOutputStream out = new FileOutputStream(thisfile);
if ((filetype.equals(".rtf")) || (filetype.equals(".doc")))
rtfkit.write(out, doc, 0, doc.getLength());
else
edkit.write(out, doc, 0, doc.getLength());
catch (Exception e)
System.out.println("" + e.getMessage() + "");
DocumentIsUnedited = true;
else
saveas();
public void open()// Find a file and read it into the document
if (DocumentIsUnedited)
int n = chooser.showOpenDialog(this); // get the outcome of the dialog
if (n == 0)
File file = chooser.getSelectedFile();
filename = chooser.getName(file);
setFiletype();
resetTitle();
initDoc();
try
FileInputStream in = new FileInputStream(file);
if (filetype.equals(".rtf"))
rtfkit.read(in, doc, 0);
edkit.read(in, doc, 0);
catch (Exception e)
System.out.println("" + e.getMessage() + "");
thisfile = new File(chooser.getCurrentDirectory(), chooser.getSelectedFile().getName());
DocumentIsUnedited = true;
DocumentIsSaved = true;
resetTitle();
repaint();
else
switch (showNotSavedDialog("Open"))
case JOptionPane.YES_OPTION:
save();
open();
break;
case JOptionPane.NO_OPTION:
DocumentIsUnedited = true;
open();
break;
case JOptionPane.CANCEL_OPTION:
break;
private void setFiletype()// Helper method to get the filetype of saved/opened documents
filetype = null;
for (int i = 0; i < FileFormats.length; i++)
if (filename.toLowerCase().endsWith(FileFormats[i]))
filetype = FileFormats[i];
else
for (i = 0; i < filename.length(); i++)
if (filename.toLowerCase().charAt(i) == '.')
filetype = filename.substring(i);
if (filetype == null) filetype = ".txt";
private void resetTitle()
this.setTitle("SimpleTextEditor - " + filename);
private ImageIcon getMyIcon(String filename)
ImageIcon pic = new ImageIcon("Images/" + filename);
return pic;
private int showNotSavedDialog(String title)// Helper method to create "Save? Yes/No/Cancel" dialogs
int n = JOptionPane.showConfirmDialog(this, "The last document has not been saved. \nDo you want to save it first?",
title,
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.QUESTION_MESSAGE);
return n;
//-----------------| Listeners and Helper classes |----------------
protected class MyDocumentListener implements DocumentListener
public void insertUpdate(DocumentEvent e)
SimpleTextEditor.this.DocumentIsUnedited = false;
public void removeUpdate(DocumentEvent e)
SimpleTextEditor.this.DocumentIsUnedited = false;
public void changedUpdate(DocumentEvent e)
SimpleTextEditor.this.DocumentIsUnedited = false;
protected class MyUndoableEditListener implements UndoableEditListener
public void undoableEditHappened(UndoableEditEvent e)
//Remember the edit and update the menus.
undo.addEdit(e.getEdit());
undoAction.updateUndoState();
redoAction.updateRedoState();
//Helper class for FileFilter, allows a description to be assigned to a filetype
protected class SimpleFilter extends javax.swing.filechooser.FileFilter
String type,des;
public SimpleFilter(String type, String des)
this.des = des;
this.type = type;
public boolean accept(File f)
if (f.isDirectory())
return true;
else
if (f.getName().toLowerCase().endsWith(type))
return true;
else
return false;
public String getDescription()
return des;
//------------| Methods to help create menus and toolbar |--------------
protected JMenu createStyleMenu()
JMenu menu = new JMenu("Style");
menu.add(bold);
menu.add(italic);
menu.add(underline);
menu.addSeparator();
menu.add(new StyledEditorKit.FontSizeAction("12", 12));
menu.add(new StyledEditorKit.FontSizeAction("14", 14));
menu.add(new StyledEditorKit.FontSizeAction("18", 18));
menu.addSeparator();
menu.add(new StyledEditorKit.FontFamilyAction("Serif", "Serif"));
menu.add(new StyledEditorKit.FontFamilyAction("SansSerif", "SansSerif"));
menu.addSeparator();
Action red = new StyledEditorKit.ForegroundAction("Red", new Color(255, 0, 0));
red.putValue(Action.SMALL_ICON, getMyIcon("red.gif"));
menu.add(red);
Action green = new StyledEditorKit.ForegroundAction("Green", new Color(0, 150, 0));
green.putValue(Action.SMALL_ICON, getMyIcon("green.gif"));
menu.add(green);
Action blue = new StyledEditorKit.ForegroundAction("Blue", new Color(0, 50, 150));
blue.putValue(Action.SMALL_ICON, getMyIcon("blue.gif"));
menu.add(blue);
Action black = new StyledEditorKit.ForegroundAction("Black", new Color(0, 0, 0));
black.putValue(Action.SMALL_ICON, getMyIcon("black.gif"));
menu.add(black);
menu.add(more);
return menu;
protected JMenu createEditMenu()
JMenu menu = new JMenu("Edit");
menu.add(undoAction);
menu.add(redoAction);
menu.addSeparator();
menu.add(cut);
menu.add(copy);
menu.add(paste);
menu.addSeparator();
Action selectall = getActionByName(DefaultEditorKit.selectAllAction);
selectall.putValue(Action.NAME, "Select All");
menu.add(selectall);
return menu;
protected JMenu createFormatMenu()
JMenu menu = new JMenu("Format");
menu.add(spellchecker);
menu.add(alignleft);
menu.add(alignright);
menu.add(aligncentre);
menu.add(alignjustify);
return menu;
protected JMenu createInsertMenu()
JMenu menu = new JMenu("Insert");
Action insertimage = new InsertImageAction(this);
menu.add(insertimage);
Action insertdate = new InsertDateAction();
menu.add(insertdate);
Action insertline = new InsertLineAction();
menu.add(insertline);
JMenu bullets = new JMenu("Bullet Points");
bullets.add(new InsertBulletAction(CIRCLE, "Circle"));
bullets.add(new InsertBulletAction(TRIANGLE, "Triangle"));
bullets.add(new InsertBulletAction(SQUARE, "Square"));
menu.add(bullets);
return menu;
public JToolBar createToolbar()
JToolBar bar = new JToolBar();
JButton newbutton = new JButton(getMyIcon("new.gif"));
newbutton.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
newDoc();
bar.add(newbutton);
JButton savebutton = new JButton(getMyIcon("save.gif"));
savebutton.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
save();
bar.add(savebutton);
JButton openbutton = new JButton(getMyIcon("open.gif"));
openbutton.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
open();
bar.add(openbutton);
bar.addSeparator();
for (int i = 0; i < tools.length; i++)
JButton button = new JButton();
button.setAction(tools[i]);
button.setIcon(getMyIcon(tools[i].getValue(Action.NAME) + ".gif"));
button.setText("");
bar.add(button);
if ((i == 2) || (i == 6)) bar.addSeparator();
return bar;
public void createToolbarActions()
bold = new StyledEditorKit.BoldAction();
bold.putValue(Action.NAME, "Bold");
italic = new StyledEditorKit.ItalicAction();
italic.putValue(Action.NAME, "Italic");
underline = new StyledEditorKit.UnderlineAction();
underline.putValue(Action.NAME, "Underline");
more = new MoreColorsAction();
cut = getActionByName(DefaultEditorKit.cutAction);
cut.putValue(Action.NAME, "Cut");
copy = getActionByName(DefaultEditorKit.copyAction);
copy.putValue(Action.NAME, "Copy");
paste = getActionByName(DefaultEditorKit.pasteAction);
paste.putValue(Action.NAME, "Paste");
alignleft = new StyledEditorKit.AlignmentAction("Left Justify", StyleConstants.ALIGN_LEFT);
alignright = new StyledEditorKit.AlignmentAction("Right Justify", StyleConstants.ALIGN_RIGHT);
aligncentre = new StyledEditorKit.AlignmentAction("Align Centre", StyleConstants.ALIGN_CENTER);
alignjustify = new StyledEditorKit.AlignmentAction("Fully Justify", StyleConstants.ALIGN_JUSTIFIED);
spellchecker = new StyledEditorKit.AlignmentAction("Spell Checker", StyleConstants.ALIGN_JUSTIFIED);
tools = new Action[]{cut, copy, paste, bold, italic, underline, more, alignleft, alignright, aligncentre, alignjustify, spellchecker};
// helper methods to enable menu creators to get their actions by name
private void createActionTable(JTextComponent textComponent)
actions = new Hashtable();
Action[] actionsArray = textComponent.getActions();
for (int i = 0; i < actionsArray.length; i++)
Action a = actionsArray[i];
actions.put(a.getValue(Action.NAME), a);
private Action getActionByName(String name)
return (Action) (actions.get(name));
//----------------| Custom Actions |--------------------
class InsertImageAction extends AbstractAction
protected SimpleTextEditor parent;
public InsertImageAction(SimpleTextEditor parent)
super("Image...");
this.parent = parent;
public void actionPerformed(ActionEvent e)
int n = parent.picChooser.showOpenDialog(parent);
if (n == 0)
String filename = picChooser.getSelectedFile().getName();
File file = new File(picChooser.getCurrentDirectory(), filename);
Icon pic = new ImageIcon(file.getAbsolutePath());
textpane.insertIcon(pic);
SimpleTextEditor.this.repaint();
class InsertDateAction extends AbstractAction
public InsertDateAction()
super("Date");
public void actionPerformed(ActionEvent ble)
Calendar c = Calendar.getInstance();
String[] months = new String[]{"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"};
textpane.replaceSelection(c.get(c.DAY_OF_MONTH) + "/" + months[c.get(c.MONTH)] + "/" + c.get(c.YEAR));
class InsertLineAction extends AbstractAction
public InsertLineAction()
super("Horizontal line");
public void actionPerformed(ActionEvent e)
Icon pic = new ImageIcon("Images/line.gif");
textpane.insertIcon(pic);
class InsertBulletAction extends AbstractAction
protected int type;
protected String filenames[] = new String[]{"square.gif", "triangle.gif", "circle.gif"};
public InsertBulletAction(int type, String name)
super(name);
this.type = type;
this.putValue(SMALL_ICON, new ImageIcon("Images/" + filenames[type]));
public void actionPerformed(ActionEvent e)
Icon pic = new ImageIcon("Images/" + filenames[type]);
textpane.insertIcon(pic);
textpane.replaceSelection(" ");
class MoreColorsAction extends AbstractAction
public MoreColorsAction()
super("More Colors");
public void actionPerformed(ActionEvent e)
AttributeSet as = textpane.getCharacterAttributes();
SimpleAttributeSet sas = new SimpleAttributeSet(as);
Color newColor = JColorChooser.showDialog(
SimpleTextEditor.this,
"Choose Text Color",
doc.getForeground(as));
if (newColor != null)
StyleConstants.setForeground(sas, newColor);
textpane.setCharacterAttributes(sas, true);
SimpleTextEditor.this.repaint();
class UndoAction extends AbstractAction
public UndoAction()
super("Undo");
setEnabled(false);
public void actionPerformed(ActionEvent e)
try
undo.undo();
catch (CannotUndoException ex)
System.out.println("Unable to undo: " + ex);
ex.printStackTrace();
updateUndoState();
redoAction.updateRedoState();
protected void updateUndoState()
if (undo.canUndo())
setEnabled(true);
putValue(Action.NAME, undo.getUndoPresentationName());
else
setEnabled(false);
putValue(Action.NAME, "Undo");
class RedoAction extends AbstractAction
public RedoAction()
super("Redo");
setEnabled(false);
public void actionPerformed(ActionEvent e)
try
undo.redo();
catch (CannotRedoException ex)
System.out.println("Unable to redo: " + ex);
ex.printStackTrace();
updateRedoState();
undoAction.updateUndoState();
protected void updateRedoState()
if (undo.canRedo())
setEnabled(true);
putValue(Action.NAME, undo.getRedoPresentationName());
else
setEnabled(false);
putValue(Action.NAME, "Redo");
//-------------| Very nice Image Previewer 'borrowed' from Sun's Java Tutorial
class ImagePreview extends JComponent implements PropertyChangeListener
ImageIcon thumbnail = null;
File file = null;
public ImagePreview(JFileChooser fc)
setPreferredSize(new Dimension(100, 50));
fc.addPropertyChangeListener(this);
public void loadImage()
if (file == null)
return;
ImageIcon tmpIcon = new ImageIcon(file.getPath());
if (tmpIcon.getIconWidth() > 90)
thumbnail = new ImageIcon(tmpIcon.getImage().getScaledInstance(90, -1,
Image.SCALE_DEFAULT));
else
thumbnail = tmpIcon; -
Duplicate of [/questions/860865]
Question
I keep getting this pop-up every few minutes: "This web page is being redirected to a new location. Would you like to resend the form data you have typed to the new location?" I'm sick of it!!! How can I get rid of it???Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
*Don't make any changes on the Safe mode start window.
*https://support.mozilla.com/kb/Safe+Mode
*https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
Do a malware check with some malware scanning programs.<br />
You need to scan with all programs because each program detects different malware.<br />
Make sure that you update each program to get the latest version of their databases before doing a scan.<br />
<br />
* http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
* http://www.superantispyware.com/ - SuperAntispyware
* http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
* http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
* http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
See also:
* "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked -
Why do I get a CATCHA code every time I try to send an e mail-just started recently
why do I get a CATCHA code every time I try to send an e mail on safari-just started recently
It's likely that AT$T is recognizing that version of Safari as not compliant with their anti-spam or security requirements for their webmail application. Assuming you are running OS X "Snow Leopard" that Safari version is the latest one. That's annoying because I am not aware of any noteworthy security improvements in subsequent Safari releases, and AT$T ought not to treat it any differently.
Your alternatives are to upgrade your Mac's operating system, which has certain minimum hardware requirements, or simply use your Mac's Mail application. Or, just use Firefox when you want to use webmail. Otherwise you'll have to put up with their silly Captcha annoyances.
To add your AT$T email account to Mail, start here: http://www.apple.com/support/macosx/mailassistant/
To upgrade OS X start here: http://www.apple.com/osx/how-to-upgrade/ -
When i enter my passcode, it appears as a different account. Every time i go to iforgot to reset my password, and then try to ise it, it doesnt work. Help please!!!
Maybe it is not 'THI' that Siri is saying. I think it is 'GHI'. When I get to the passcode screen, she says "passcode field zero values".
-
Two new MIFIs, radically different speeds
I have two Verizon Jetpack MIFIs, both about two months old and both running on 3G through a Wilson booster in my home. Each MIFI is on a separate contract with Verizon. The speed test for one MIFI is 2.62Mbps up, .87Mbps down. The other is .12 up, and .18 down when I can get the full test to run because of its slowness. The test software says that the faster MIFI is using a Towerstream server in Seattle, the other MIFI is connecting through a Wichita server by KS Fibernet. I live near Spokane, Washington, which is about 200 miles from Seattle and a LONG way from Wichita.
Question: why would one MIFI be providing adequate speeds, while the other is essentially useless?AFter some telephone conversation and behind-the scenes troubleshooting
with Verizon experts, Verizon sent me a replacement MIFI and sim
card. After swapping parts around between my MIFI and the
replacement unit, it because obvious that the replacement sim card was
dead on arrival, and installing my sim card in the replacement MIFI didn't
make any difference in the performance of the MIFI.
I'll
be returning the replacement MIFI and sim card to Verizon. On to
plan C.
Don
Verizon Wireless Customer Support
Verizon Wireless Customer Support
created the discussion
"Re: Two new
MIFIs, radically different speeds"
To view the
discussion, visit:
https://community.verizonwireless.com/message/1016140#1016140
> -
I get a conversion failure every time I upload a pdf to combine - any ideas?
I get a conversion failure every time I upload a pdf to combine - any ideas?
Hi sharon,
Have you tried combining any other PDFs apart from ones which fail to combine?
Are the PDF files complex or simple?
You might try using a different browser.
Regards,
Anubha -
I keep getting "camera not detected" every time I tried to download photos from my Powershot SD1000? I tried different USB cables and still didn't work,
Hi garyliban!
Please ensure that your camera's software is up to date. The older versions that came with your camera were out long before Windows 8, so they need to be updated to be able to work with Windows 8. Please click here to go to the download page.
If this is a time sensitive-matter, additional support options are available at Contact Us.
Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well.
Maybe you are looking for
-
Problem: Uploading Video To iPod
Ok here's the issue. 8 times out of 10 when I connect my iPod via USB, it does not give me the option to upload video to my iPod. I would click on the "iPod Options" where you can select Automatically update this and that... and I only see four stand
-
I use ADP site to see payslips, most pages under ADP site work fine; however, the payslip page won't come up right. A little bit of the page appears but the frame in the middle of the page is blank.
-
USB external audio only works after reboot
I have a EMU 0202 USB soundcard in order to be able to hear sound in my late 2008 macbook (because the mini-jack from the headphones broke inside the laptop. but this is another story). The problem is that in order for the laptop to detect this sound
-
Windows 7 Expired Password - Recvd Warning prompts but not forced to change password
Our Windows 7 users are prompted when their passwords will expire in 14 Days, however They are not forced to change thier password before it expires. If the users ignore the expiration warning they can only get logged into the network after having th
-
How to enable NAT on Time Capsule
Ultimate Objective: Enable the "Back to my Mac" feature. In order to do so, NAT has to be enabled on my Time Capsule whose current "Connection Sharing" is set to "Bridge Mode". Here's the initial configuration TC>Internet> Internet Connection -Connec