Need help with pop-up menu and applied Rules

I'm working on a spreadsheet that calculates my profit and losses. I drive a big rig so it needs to keep track of a lot of variables so I know if I'm going to make money on a run or lose money.
I get fuel discounts of various amounts depending on which vendor I fuel at.
I went to a section of the sheet and did a pop-up menu that contains the vendor names.
In the trip section I have cost of fuel per gallon, gallons purchased, total fuel cost, cost minus fuel surcharge.
What I would like to do is apply a rule to cost per gallon box (H7) that takes a variable from the pop-up menu (B40).
So if H7 has $2.58 entered as a cost and B40 has pilot selected then $0.050 will automatically be deducted from the $2.58. This way I will have a history of where I fuel, the deduction is made automatically, and I have a history of fuel prices in a certain region.
If anyone looks at this and sees a simpler way of figuring this calculation please make the suggestion. I want to keep this sheet as small and hassle free as possible.
I have 3 fuel stops per trip with totals that are connected to other areas. Once I get all of this done I will be adding a chart for easy comparison and long range simple tracking to see where improvements can be made and costs are going.
Thanks in advance all help will be appreciated.
Message was edited by: Hwoodwriter for clarification.

The IF Lookup table worked. Did a little modification by placing the table in another part of the chart then hiding that part.
I tried doing the discount as a negative but got a negative total which had a negative affect on my total trip income.
Here is how it works in it's final version.
Gallons on board minus gallons required for trip.
Cost per gallon (retail) multiplied by gallons purchased.
Fuel cost equals (Gallons purchased multiplied by Retail gallon price) minus ("IfLookup" multiplied by Gallons purchased)
Fuel Cost Minus Fuel Surcharge (the actual price I pay, which includes all my savings) equals (Retail Gallon Cost minus Fuel Surcharge minus "IfLookup") multiplied by Gallons Purchased.
Some of my trips take up to 3 fuel stops. So this helps me keep track of each fuel stop and all savings per trip.
I now have where I fueled, the retail price, with discount and surcharge applied. A few keystrokes and I know if a trip is going to be profitable or a loss for me.
Thank you for the help. I now have what I need at my fingertips to make my job more effective.
Thanks again.

Similar Messages

  • Need help with pop-up menu please!

    So I have an older version of Dreamweaver.
    I want to apply a drop-down menu or pop-up menu whatever to
    words, but so far I don't think I can do that.
    I've decided to apply it to a picture instead, and I've done
    this successfuly before.
    I select the picture, then go to behaviors and select "show
    pop-up menu", fill in the info and say OK, but I then get this
    message that goes something like "while applying behaviors action
    javascript failed" and "ReferenceError:imgName isNot defined" or
    whatever and it won't let me add it.
    I've restarted the program and even my computer but it won't
    go away.
    Does anyone know how to fix this?
    -anna

    > So I have an older version of Dreamweaver.
    DW4?
    The pop-up menus are very troublesome. Nobody here would
    recommend that you
    use them.
    > Does anyone know how to fix this?
    What is your operating system?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "anzya91" <[email protected]> wrote in
    message
    news:eibt0r$esr$[email protected]..
    > So I have an older version of Dreamweaver.
    > I want to apply a drop-down menu or pop-up menu whatever
    to words, but so
    > far
    > I don't think I can do that.
    > I've decided to apply it to a picture instead, and I've
    done this
    > successfuly
    > before.
    > I select the picture, then go to behaviors and select
    "show pop-up menu",
    > fill
    > in the info and say OK, but I then get this message that
    goes something
    > like
    > "while applying behaviors action javascript failed" and
    > "ReferenceError:imgName
    > isNot defined" or whatever and it won't let me add it.
    > I've restarted the program and even my computer but it
    won't go away.
    > Does anyone know how to fix this?
    >
    > -anna
    >

  • Need help with my iPhone 5 and my Macbook Pro.

    Need help with my iPhone 5 and my Macbook Pro.  I was purchased some music on itunes at my mac. Some reason I deleted those music from both on Mac and iPhone 5.  Today, I went to my iPhone iTunes store inside of iCloud to redownload my puchased. But those song won't able to sync back to my iTunes library on my Mac.  Can anyone help me with that ??....
    iPhone 5, iOS 6.0.1

    You've posted to the iTunes Match forum, which your question does not appear to be related to. You'll get better support responses by posting to either the iTunes for Mac or iTunes for Windows forum. Which ever is more appropriate for your situation.

  • Need help with pop-up

    Need help with this one. All of a sudden I keep getting a
    pop-up saying "cannot locate file flash.ocx". What the heck is it
    and how do I get rid of it. It is QUITE annoying. Any help would be
    appreciated.

    I am glad to hear that changing or disabling the screensaver
    seems to fix this problem for most of us. Certainly, screensavers
    are pretty antiquated and pointless on the newer computers out
    there, but there are still some uses. Ever since I turned mine off
    on one computer and switched to an older screensaver on my oldest
    computer, I have not had this problem. And, unfortunately, I think
    the problem is isolated to such a small fraction of screensavers
    that adobe is just going to let those distributors take care of the
    problem rather than spending the time to fix whatever glitch is
    affecting them. The only downside is that once you figure out the
    problem, which can take time and effort, you could lose a pretty
    cool screensaver. All in all, that isn't much in the long run,
    certainly not enough to get adobe involved.

  • I need help with my text tone and I have ring tone. no text tone for the 4s.

    I need help with my text tone. I have ring tone no text tone. I have a 4s.

        Hi Sarar2333!  Let's get your text tones working again!
    Here's a link with instructions how to enable and change your alert sounds for your text/notification settings on your iPhone 4S: http://vz.to/1stiF8a.  You can ensure text tones are enabled by selecting a tone in the "Text Tone" setting.  Let me know how that works out for you.  Thanks!
    AnthonyTa_VZW
    Follow us on Twitter @VZWSupport

  • Need help with buying graphics card and ram for MSI 865PE NEO 2-V

    Hi,
    I want to buy 1GB of ram for motherboard MSI 865PE NEO 2-V I need help with finding correct parts.
    I also want to buy 512Mb or 1GB graphics card.
    as i said before i need help with finding correct ones so they match motherboard, I would appreciate if any one would post link to cheap and fitting parts.
    I found graphics card allready, i just need to know if it will fit.
    the card is
    NVIDIA GeForce 7600 GS (512 MB) AGP Graphics Card
    Thanks for help.

    here you can see test reports for your mobo:
    http://www.msi.com/product/mb/865PE-Neo2-V.html#?div=TestReport

  • Need help with clickbios ii terminolgy and values. Z77A-GD65 / 3770k

    Hello All 
    I recently purchased a Z77A-GD65 board and after searching I've found the differences in terminology between this and my previous Asus board but still have a couple of settings I cant find any info on.
    System Specs:
    motherboard: msi z77a-gd65
    cpu: intel 3770k
    ram: corsair vengeance 2133mhz 1.5v
    psu: corsair 850w
    First things first is I believe I am running in turbo oc mode. I've selected the oc genie tab on the center right of the bios screen and proceeded to change settings there. With cpu voltage on auto and vdroop set to 50% at 4.6ghz. (I'll try and get screenshots of bios settings soon)
    The following are the terms I need help with:
    In the my oc genie section;
     1. Long duration power limit
     2. Long duration maintained
     3. Short duration power limit
    In the main overclocking section;
     4. Digital Compensation level (not in owners manual, options auto/high)
     5. Cpu core ocp expander (enabled for overclock 4.5ghz+?)
    In the CPU Features section;
     6. long duration power limit w (does "w" stand for watts?)
     7. long duration maintained s   (does "s" stand for seconds?)
     8. short duration power limit
     9. primary plane current limit a  (does "a" stand for amps?)
    10. secondary plane current limit
    11. primary plane turbo power limit
    12. secondary plane turbo power
    I know those are a lot of settings, but would appreciate any simple definitions as to what they do and recommended values for mild overclocking (4.5-4.80)
    Also on my previous board (Asus P8P67 Pro) my 3770k was stable in prime95 for 18 hrs at 4.5ghz fixed 1.155v with only ram timings put in manually and LLC set to extreme.(or whatever max is called in asus bios) Voltage was fixed and everything else was defailts.

    Well I'm back.  Been digging around for a few days and found some answers to my questions.
    First things first s that for some reason I could not adjust voltage values with the + or - symbols. Clearing cmos did not help this. I had to reflash the bios to get this functionality back as well as clearing cmos before and after the flash.
    So I figured out the values in the oc genie section are the same as the normal section but only used when your using the oc genie. (numbers 1-3)
    Digital compensation level and ocp expander should be set to high and enabled respectively when going for higher overclocks. (4 and 5)
    Now for the rest of my questions ( 6 through 12) I have found suggested settings and some info after hours and hours of searching but still have a couple of questions about them.
    Long/short duration power limit, and primary/secondary plane turbo limit. I see suggestion settings of 250 or 255. I take it this is simply max supplied watts to the chip? If so why the 250/255 values? Is that the highest the board will give? Is plane turbo limit related to the enhanced turbo stated and how much wattage can be drawn there while the other limit is for any non turbo frequencies?
    Long duration maintained, I've seen 60 suggested a lot. Why is this?
    There's not an over abundance of info on these boards as compared to asus so it seems info is a little less documented and video tutorials explaining things are next to none.
    Any help would be appreciated. Thanks 

  • HT4528 I need help with my I phone and I can get verizon to let me on there to talk and I will have to have my phone so that I can do what you tell me to do

    I need help with my phone it is not ringing and I cant figure where in here to make it so it will something has been pushed so I cant hear any calls or texts

    Not when you insist on being so impatient.
    These are user to user support forums.  No one here is paid to read or respond to messages.
    Try explaining the issue instead of the jumbled, rambling mess of a title and we will be happy to assist.

  • Need help with ext. SWF and XML

    I'm trying to create an External SWF to load into my main
    site (photography).
    Home | Portfolio | Published Work | Bio | Contact
    The SWF I want to load externally is Portfolio because it has
    5 sections
    Those 5 sections are:
    -Editorial
    -Adventure
    -Fly Fishing
    -Multimedia
    -Weddings
    I'm looking to keep this dynamic as possible, but I'm one of
    those guys who doesn't write code from scratch, but knows AS well
    enough to modify a base or a generic template if ever given. It
    would be easier to use one subsection as an example, which could be
    applied to all others.
    e.g. "Fly Fishing" 1-Main container; 5-10 thumbnails (1
    dyanamic thumbnailcontainer)
    - I don't know XML (but can modify it). basically having an
    ID tag for each image, possibly dynamically generate a thumbnail
    too. Also have a spot for dynamic text to load in (captions with
    multiple text lines for images upon onRelease - maybe this could be
    it's own MC that loads on top of the main photo container)
    - on (release) on a thumbnail: there would be a little
    information icon that would appear. If you mouse over, it would
    overlay a layer over that specific ID photo, and the text appear.
    RollOut it would fade out the layer above that specific ID photo.
    - Transition: FadeOut/Blur/Exposure Blur, something
    interesting to that nature.
    - Thumbnails: is it just easier to create thumbnail images
    manually, and just create a separate container?
    - Image folders: I would imagine each section would have
    it's own watch folder. For example "Fly Fishing" would be a folder
    "/swfImg_flyFishing/", but perhaps having one XML file.
    - XML file details
    id
    location
    caption summary
    title
    As you can see, if I had one template to build off of, I
    could repeat it self for the others. I need help and if there is a
    flash component (free or purchase) that does at least 70% of what I
    need, please share information. thank you!Portfolio

    I know doing a pushback to the client requires Flex Data
    Services, but since I don't use FDS I can't tell you exactly how.
    But look in the documentation about "pushing" data to the client.
    Once you've figured out how to do that, you can trigger that push
    once you've finished editing the xml file. You may want to ask over
    in the FDS forum.

  • Need help with pop up menus...

    Hi guys, hope u can help me with this. Im working on a flash
    website. I have to include a pop up menu which I have managed to
    create no problem. However, when I try to make the buttons inside
    the pop up to change to another scene when clicked I cant get them
    to work. This is the code I've used:
    on (release) {
    _root.gotoAndStop("Student_area","tests");
    I have defined the action to go to the frame labeled "tests"
    in the "Student_area" scene as I have been told in a tutorial I
    have. However when I test it and click on it nothing happens. I
    have tried many variations such as simply telling it to take me to
    the students scene like I would do with a normal button but still
    nothing happens.
    What am I doing wrong?
    Hope someone can help me, gotta submit this soon.
    Thanks in advance.

    bump...
    Anyone?? Please.

  • Need Help: JTable POP up menu in a CellEditor to display on a right click

    This was from a previous post:
    I am trying to make a POP menu in a JTextComponent that has a assigned JEditorPane for a HTMLDocument to make use of the HTMLEditorKit to allow modifying HTML by the POP up menu.
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    import javax.swing.table.*;
    import javax.swing.text.html.*;
    import javax.swing.undo.*;
    import javax.swing.border.*;
    import javax.swing.filechooser.*;
    public class SimpleTableDemo extends JFrame {
        public SimpleTableDemo() throws Exception {
            final JTable table = new JTable(new MyTableModel());
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            TableColumn fileColumn = table.getColumnModel().getColumn(2);
            FileTableCellEditor editor = new FileTableCellEditor();
            fileColumn.setCellRenderer(editor);
            fileColumn.setCellEditor(editor);
            JScrollPane scrollPane = new JScrollPane(table);
            getContentPane().add(scrollPane, BorderLayout.CENTER);
            addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                System.exit(0);
                table.setRowHeight(100);
            public static void main(String[] args) throws Exception {
                SimpleTableDemo frame = new SimpleTableDemo();
                frame.pack();
                frame.setVisible(true);
            class MyTableModel extends AbstractTableModel {
                String[] columnNames = {"First Name","Last Name","HTML File"};
                public Object[][] data;
                MyTableModel() throws Exception
                    data = createArray();
                private Object[][] createArray() throws Exception
                    Object[][] data = {{"One", "Andrews", createDoc("file1.html")}
                return data;
                private Document createDoc(String url) throws Exception
                    File file = new File(url);
                    URL baseURL = file.toURL();
                    InputStream in = baseURL.openStream();
                    InputStreamReader r = new InputStreamReader(filterTag(in));
                    HTMLEditorKit kit = new HTMLEditorKit();
                Document doc = kit.createDefaultDocument();
                kit.read(r,doc,0);
                return doc;
                } // workaround for HTMLEditorKit.Parser, cant deal with "content-encoding"
                private InputStream filterTag(InputStream in) throws IOException {
                    DataInputStream dins = new DataInputStream( in);
                    ByteArrayOutputStream bos = new ByteArrayOutputStream(10000);
                    DataInputStream din = new DataInputStream(new BufferedInputStream(in));
                    while (din.available() > 0) {
                    String line = din.readLine();
                    String lline = line.toLowerCase();
                    if (0 <= lline.indexOf("<meta ")) // skip meta tags
                    continue;
                    bos.write( line.getBytes());
                    din.close();
                    return new ByteArrayInputStream( bos.toByteArray());
                public int getColumnCount() {
                    return columnNames.length;
                public int getRowCount() {
                    return data.length;
                public String getColumnName(int col) {
                    return columnNames[col];
                public Object getValueAt(int row, int col) {
                    return data[row][col];
                public Class getColumnClass(int c) {
                    return getValueAt(0, c).getClass();
                public boolean isCellEditable(int row, int col) {
                if (col >< 1) {
                    return false;
                } else {
                    return true;
    public class FileTableCellEditor extends JScrollPane implements TableCellEditor , TableCellRenderer
        public JTextComponent jtext;
        JEditorPane editor;
        HTMLEditorKit kit = new HTMLEditorKit();
        HTMLDocument doc = new HTMLDocument();;
        private EventListenerList listenerList = new EventListenerList();
        private ChangeEvent event = new ChangeEvent(this);
        public FileTableCellEditor()
        editor = new JEditorPane();
        editor.setContentType("text/html");
        doc=new HTMLDocument();
        editor.addMouseListener(new MouseHandler());
        editor.setEditorKit(kit);
        editor.setDocument(doc);
        editor.setEditable(true);
        editor.setCaretColor(Color.RED);
        getViewport().setView(editor);
        setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
        setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        public Component getTableCellRendererComponent(JTable table, Object value,
        boolean isSelected, boolean hasFocus, int row, int column)
            // System.out.println("has focus: "+hasFocus+", isSelected: "+isSelected);
            if (isSelected)
            table.editCellAt(row,column);
        table.editCellAt(row,column);
        return getTableCellEditorComponent(table,value,isSelected, row, column);
        public Component getTableCellEditorComponent(JTable table,
        Object value, boolean isSelected, int row, int column)
        editor.setDocument((Document)value);
        return this;
        public boolean isCellEditable(EventObject anEvent)
        { return true;
        public boolean shouldSelectCell(EventObject anEvent)
        { return true;
        public void cancelCellEditing()
        { fireEditingStopped();
        public boolean stopCellEditing()
        { return true;
        public Object getCellEditorValue()
        { return null;
        public void addCellEditorListener(CellEditorListener l)
        { listenerList.add(CellEditorListener.class, l);
        public void removeCellEditorListener(CellEditorListener l)
        { listenerList.remove(CellEditorListener.class, l);
        protected void fireEditingStopped()
        { Object[] listeners = listenerList.getListenerList();
        for (int i = listeners.length - 2; i >= 0; i -= 2)
        ((CellEditorListener)listeners[i+1]).
        editingStopped(event);
        protected void fireEditingCanceled()
        { Object[] listeners = listenerList.getListenerList();
        for (int i = listeners.length - 2; i >= 0; i -= 2)
        ((CellEditorListener)listeners[i+1]).
        editingCanceled(event);
            ///////////createPopupMenu///////////////
            protected JPopupMenu createPopupMenu()
            JPopupMenu popup =new JPopupMenu();
            popup.add(getTextComponent().getActionMap().get(HTMLEditorKit.cutAction)).setAccelerator(null);
            popup.add(getTextComponent().getActionMap().get(HTMLEditorKit.copyAction)).setAccelerator(null);
            popup.add(getTextComponent().getActionMap().get(HTMLEditorKit.pasteAction)).setAccelerator(null);
            popup.addSeparator();
            popup.add(getTextComponent().getActionMap().get("font-bold"));
            popup.add(getTextComponent().getActionMap().get("font-italic"));
            popup.add(getTextComponent().getActionMap().get("font-underline"));
            //popup.add(getTextComponent().getActionMap().get("break"));
            return popup;
        public JTextComponent getTextComponent()
             return jtext;
        protected class MouseHandler extends MouseAdapter{
           public void mouseReleased(MouseEvent me){
               if(me.getButton()==MouseEvent.BUTTON3){
               Point p=me.getPoint();
               createPopupMenu().show((Component)me.getSource(),p.x,p.y);
    }

    I got the pop up to work, I had to go back to and add a createActionTable editor that is a JEditorPane, vs the JTextComponent!
    Here is the latest version:
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.HashMap;
    import javax.swing.*;
    import javax.swing.undo.*;
    import javax.swing.event.*;
    import javax.swing.text.*;
    import javax.swing.table.*;
    import javax.swing.text.html.*;
    import javax.swing.undo.*;
    import javax.swing.border.*;
    import javax.swing.filechooser.*;
    public class SimpleTableDemo extends JFrame {
        public SimpleTableDemo() throws Exception {
            final JTable table = new JTable(new MyTableModel());
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            TableColumn fileColumn = table.getColumnModel().getColumn(2);
            FileTableCellEditor editor = new FileTableCellEditor();
            fileColumn.setCellRenderer(editor);
            fileColumn.setCellEditor(editor);
            JScrollPane scrollPane = new JScrollPane(table);
            getContentPane().add(scrollPane, BorderLayout.CENTER);
            addWindowListener(new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                System.exit(0);
                table.setRowHeight(100);
            public static void main(String[] args) throws Exception {
                SimpleTableDemo frame = new SimpleTableDemo();
                frame.pack();
                frame.setVisible(true);
            class MyTableModel extends AbstractTableModel {
                String[] columnNames = {"First Name","Last Name","HTML File"};
                public Object[][] data;
                MyTableModel() throws Exception
                    data = createArray();
                private Object[][] createArray() throws Exception
                    Object[][] data = {{"One", "Andrews", createDoc("file1.html")}
                return data;
                private Document createDoc(String url) throws Exception
                    File file = new File(url);
                    URL baseURL = file.toURL();
                    InputStream in = baseURL.openStream();
                    InputStreamReader r = new InputStreamReader(filterTag(in));
                    HTMLEditorKit kit = new HTMLEditorKit();
                Document doc = kit.createDefaultDocument();
                kit.read(r,doc,0);
                return doc;
                } // workaround for HTMLEditorKit.Parser, cant deal with "content-encoding"
                private InputStream filterTag(InputStream in) throws IOException {
                    DataInputStream dins = new DataInputStream( in);
                    ByteArrayOutputStream bos = new ByteArrayOutputStream(10000);
                    DataInputStream din = new DataInputStream(new BufferedInputStream(in));
                    while (din.available() > 0) {
                    String line = din.readLine();
                    String lline = line.toLowerCase();
                    if (0 <= lline.indexOf("<meta ")) // skip meta tags
                    continue;
                    bos.write( line.getBytes());
                    din.close();
                    return new ByteArrayInputStream( bos.toByteArray());
                public int getColumnCount() {
                    return columnNames.length;
                public int getRowCount() {
                    return data.length;
                public String getColumnName(int col) {
                    return columnNames[col];
                public Object getValueAt(int row, int col) {
                    return data[row][col];
                public Class getColumnClass(int c) {
                    return getValueAt(0, c).getClass();
                public boolean isCellEditable(int row, int col) {
                if (col < 1) {
                    return false;
                } else {
                    return true;
    public class FileTableCellEditor extends JScrollPane implements TableCellEditor , TableCellRenderer
        JEditorPane editor = new JEditorPane();
        HTMLEditorKit kit = new HTMLEditorKit();
        HTMLDocument doc = new HTMLDocument();;
        private EventListenerList listenerList = new EventListenerList();
        private ChangeEvent event = new ChangeEvent(this);
        HashMap<Object, Action> actions;
        public FileTableCellEditor()
        getContentPane();
        editor.setContentType("text/html");
        doc=new HTMLDocument();
        editor.addMouseListener(new MouseHandler());
        editor.setEditorKit(kit);
        editor.setDocument(doc);
        editor.setEditable(true);
        editor.setCaretColor(Color.RED);
        getViewport().setView(editor);
        createActionTable(editor);
        makeActionsPretty();
        setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
        setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        public void makeActionsPretty(){
             Action a;
                      a=editor.getActionMap().get(HTMLEditorKit.cutAction);
                      a.putValue(Action.SHORT_DESCRIPTION,"Cut");
                      a.putValue(Action.ACCELERATOR_KEY,KeyStroke.getKeyStroke('X',Event.CTRL_MASK));
                      a=editor.getActionMap().get(HTMLEditorKit.copyAction);
                      a.putValue(Action.NAME,"Copy");
                      a.putValue(Action.SHORT_DESCRIPTION,"Copy");
                      a.putValue(Action.ACCELERATOR_KEY,KeyStroke.getKeyStroke('C',Event.CTRL_MASK));
                      a=editor.getActionMap().get(HTMLEditorKit.pasteAction);
                      a.putValue(Action.NAME,"Paste");
                      a.putValue(Action.SHORT_DESCRIPTION,"Paste");
                      a.putValue(Action.ACCELERATOR_KEY,KeyStroke.getKeyStroke('V',Event.CTRL_MASK));
        public Component getTableCellRendererComponent(JTable table, Object value,
        boolean isSelected, boolean hasFocus, int row, int column)
            if (isSelected)
            table.editCellAt(row,column);
        table.editCellAt(row,column);
        return getTableCellEditorComponent(table,value,isSelected, row, column);
        public Component getTableCellEditorComponent(JTable table,
        Object value, boolean isSelected, int row, int column)
        editor.setDocument((Document)value);
        return this;
        public boolean isCellEditable(EventObject anEvent)
        { return true;
        public boolean shouldSelectCell(EventObject anEvent)
        { return true;
        public void cancelCellEditing()
        { fireEditingStopped();
        public boolean stopCellEditing()
        { return true;
        public Object getCellEditorValue()
        { return null;
        public void addCellEditorListener(CellEditorListener l)
        { listenerList.add(CellEditorListener.class, l);
        public void removeCellEditorListener(CellEditorListener l)
        { listenerList.remove(CellEditorListener.class, l);
        protected void fireEditingStopped()
        { Object[] listeners = listenerList.getListenerList();
        for (int i = listeners.length - 2; i >= 0; i -= 2)
        ((CellEditorListener)listeners[i+1]).
        editingStopped(event);
        protected JPopupMenu createPopupMenu()
            JPopupMenu popup =new JPopupMenu();
            popup.add(getActionByName(DefaultEditorKit.cutAction));
            return popup;
        protected class MouseHandler extends MouseAdapter{
           public void mouseReleased(MouseEvent me){
               if(me.getButton()==MouseEvent.BUTTON3){
               Point p=me.getPoint();
               createPopupMenu().show((Component)me.getSource(),p.x,p.y);
        private void createActionTable(JTextComponent textComponent) {
            actions = new HashMap<Object, Action>();
            Action[] actionsArray = textComponent.getActions();
            for (int i = 0; i < actionsArray.length; i++) {
                Action a = actionsArray;
    actions.put(a.getValue(Action.NAME), a);
    private Action getActionByName(String name) {
    return actions.get(name);

  • Need Help with External Hard drives and too much music

    I am not terribly tech-savvy, and I need your help. I have a G5 PPC dual processor with an internal 250GB drive. I have two seagate firewire/USB2 external hard drives. One is 250GB and one is 350GB. I want to know how to use them to get my Mac to run faster and better.
    My original hard drive is 7GB shy of being full. Almost half of this is my itunes library which is over 100GB. The older (250GB) hard drive has about 150GB of photos/videos.
    My Mac is running slow as molasses and when I power up the external hard drives it slows down to what I recall my original Mac Plus ran like.
    I use the G5 primarily to work with photos, illustrations and creating the occasional DVD with video and photos. the apps I use most often are Photoshop, Illustrator and Painter. I always listen to music while work.
    I hope all of this information is helpful! Here is my question:
    What is the best way for me to set up and use these external hard drives to return my G5 to its original blazing (to me) fast speed?
    PPC G5 Mac OS X (10.4.9)

    I think you should look at adding two 500GB internal drives. I'd say Maxtor MaxLine Pro for cost, but they also run much warmer (43ºC even when nearly doing zilch) so I'd go with WD RE2 500GB for $40 ea. more.
    dump whatever you don't need, trash anything that is hogging space and is just temp file or useless cache. Web browsers can leave behind a ton of small files eating up tens of MBs.
    Use SuperDuper to backup/clone your drive.
    Disk Warrior 4 to repair (after it gets to 15% free, or just forget for now).
    A 250GB drive formats to 240GB and you have ~3% free it looks like.
    For every data drive plan to have two backup drives.
    Keep your boot drive to 40% used.
    And your data drive to 60%.
    Backups can go a little higher.
    Drives are cheap and inexpensive, especially for the space and performance. And they have improved SATA over the years it has been out.
    By doing a backup followed by erasing your drive, and then restoring it, using SuperDuper, which optimizes the organization, skips copying temp files that aren't needed, it also defragments your files. I would do backup daily to different sets that you "rotate." And before any OS update. And do the erase and restore probably every 2 months.
    Make sure you keep one drive partition somewhere that is just your disk utility emergency boot drive that is not a copy of working system, used for doing repairs like running Disk Warrior and Disk Utility.
    You may need to repair; backup; even erase and restore your external drives. Rather than spend on vendor made case, just pick up a good FireWire case either with drive, or bare (and add your own). I think it'd add 500GB FW drive though.
    Why?
    To begin backup of your current drive. To leave your other FW drives "as is" for now.
    Then install a new internal 500GB drive as well so you now have a good current backup, and you have moved your data off 250GB to 500GB. If anything happens, you have one off line FW backup.
    Then begin to clean up, organize, and get your FW drives working. It sure sounds like they have had some directory or file problems.
    You can find a lot of Firewire and SATA drive choices over at OWC:
    http://www.macsales.com/firewire/

  • I need help with the navigation menu please?

    I have been working my way through your six part printed instructions and I am styling the header and navigation menu.  The bullet points disappeared which was correct and the tabs moved to the right, as they should, but one tab sits underneath another tab and all tabs are covered up by my main heading.  This is dreamweaver CS6.
    It looks a bit of a mess!

    I have moved this to the main Dreamweaver forum, as the other forum is intended to deal with the Getting Started video tutorial.
    The best way to get help with layout problems is to upload the files to a website and post the URL in the forum. Someone can then look at the code, and identify the problem. Judging from your description, it sounds as though the Document window is narrow, which would result in the final menu tab dropping down to the next row. Try turning on Live view or previewing the page in a browser. Design view gives only an approximate idea of the final layout. Live view renders the page as it should look in a browser.

  • Help with pop-up menu

    Im haveing a hard time figuring out how to make a pop-up mene i created work correctly. I what to have a pop-up menu that will let you select a type of item, and return the items associate cost in the adjacent cell.
    Exaple:
    select option 1-3 in cell "A" and return values x,y & z in cell "B".
    I figured out how to create the pop-up in cell "a" but cant seam to fugure out how to give each of the options a seperate value that appears in "b".

    Assuming the pop up is in B1:
    you could enter the following formula in C1:
    =IF(B1=1, "A", IF(B1=2, "B", IF(B1=3, "C", "")))
    This will result in the following:
    B1 = 1,  C1 will return "A"
    B1 = 2,  C1 will return "B"
    B1 = 3,  C1 will return "C"
    This method is ok for a small translation set.  Much larger and it is hard to change and update.  So the next method is to recognize if there is a pattern.  If there is no pattern then you can make a translation table:
    In this case you look up the value "3" in the Data table (column 1) and return the corresponding value from a different cell in the same row (column 2):
    B3=VLOOKUP(A1, Data :: A:B, 2, 0)
    I hope this helps,
    Wayne

  • Need help with java file scanner and objects

    Hi, i've got an assignment that asks me to do these, but i cant seem to get around in solving it. Any help will be much appreciated. TYVM!
    Create a class called TVProgram that can store some important details of a television program:
    - name of the show
    - the channel the show is on
    - the start time (in 24-hour format)
    - the end time (in 24-hour format)
    Write a program that uses this class.
    Your program will read a list of TV programs, making up a schedule for an evening's TV: for you convenience, you will be able to download a sample file listing. The listing will consist of one line for each of the above fields, in the above order, for each program, followed by a line containing only the "#" character. For example, here is the start of such a file.
    At the Movies
    ABC
    1800
    1830
    The Einstein Factor
    ABC
    1830
    1900
    Your program should start with a little menu to prompt whether to read from standard input or a file:
    Please choose a number for the way you will input the TV schedule:
    1. Read from standard input
    2. Input from a file
    Your program should first read the complete schedule, then loop through all the programs in the schedule and prompt the user as to whether they want to record the program or not. For example, the program should print:
    At the Movies is showing on ABC from 1800 to 18.30.
    Do you want to record it: type Y or N.
    If the user types Y then the program sets this T Vprogram to be recorded. If the user types N, the program goes to the next entry and prompts the user again. If the user types something other than a Y or N (or y or n), then the program should prompt for a proper answer:
    Do you want to record it: type Y or N.
    Once the complete schedule has been shown to the user, the program loops through those that the user has said they want to record and checks for any clashes---i.e. any times at which the user wants to record two programs at the same time. For any clashes, your program should show these to the user and insist that only one be selected for being recorded. For example:
    At 1830 you want to record both 1. The Einstein Factor on ABC and 2. The Biggest Loser on Ten.
    Please pick option 1 or 2 to record.
    Again, if the user selects an option other than 1 or 2 in the above, then the program should make the user to make another selection until they type a legal value.
    If the schedule is in time-start order (see "Assumptions" below), then a simple way to check for clashes is:
    - as you loop through the schedule of shows, keep track of the latest end-time the user wants to record;
    - if any program the user says they want to record has a start-time before this latest end-time, then this is a clash.
    There are different ways to keep track of clashes: you can keep an array (a list of clashes) of arrays (each of these is the list of clashing programs); you could create a Clash class.
    Finally, after going through all clashes, print out the list of programs that the user still wants recorded.
    Here is the list of programs that will be recorded for you:
    From 1830 to 1930, The Biggest Loser, on Ten.
    From 1930 to 2030, Who Do You Think You Are, on SBS
    -----

    * @(#)TVProgram.java
    * @author      Okky Satya
    * @version 1.00 2008/3/29
    import java.util.*;
    import java.io.*;
    public class TVProgram {
         private String name;
         private String chnl;
         private int strt;
         private int ends;
         public TVProgram(String showName, String channel, int start, int end ){
              this.name = showName;
              this.chnl = channel;
              this.strt = start;
              this.ends = end;
        public static void readFileInput() {
        List prog = new ArrayList();
        Scanner inputFile = null;
         try
        inputFile = new Scanner(new File("tv_schedule"));
         catch (FileNotFoundException fe)
        System.out.println("File not found!");
        System.exit(0);
        while(inputFile.hasNext()== true){
             while (inputFile.nextLine()!="##")
                  new TVProgram;
        public static void readInput(){
        public static void loopInput(){
        public static void showList(){
        public static void checkUserList(){
        public static void main(String[] args){
             int menuChoice = 0;
             System.out.println("Please choose a number for the way you will input the TV schedule:\n  1. Read from standard input\n  2. Input from a file");
             switch(menuChoice){
                  case 1:
                       readInput();
                       break;
                  case 2:
                       readFileInput();
                       break;
             loopInput();
             checkUserList();
             showList();
    }

Maybe you are looking for