001    /*
002     * Copyright (C) 2003 Adam Olsen
003     *
004     * This program is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU General Public License as published by the Free Software
006     * Foundation; either version 1, or (at your option) any later version.
007     *
008     * This program is distributed in the hope that it will be useful, but WITHOUT
009     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
010     * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
011     * details.
012     *
013     * You should have received a copy of the GNU General Public License along with
014     * this program; if not, write to the Free Software Foundation, Inc., 675 Mass
015     * Ave, Cambridge, MA 02139, USA.
016     */
017    
018    package com.valhalla.gui;
019    
020    import javax.swing.JTextField;
021    
022    /**
023     * A JTextField with a copy/paste context menu
024     * @author Adam Olsen
025    **/
026    public class MJTextField extends JTextField {
027        public MJTextField(String text) {
028            super(text);
029            CopyPasteContextMenu.registerComponent(this);
030        }
031    
032        public MJTextField(int cols) {
033            super(cols);
034            CopyPasteContextMenu.registerComponent(this);
035        }
036    
037        public MJTextField() {
038            CopyPasteContextMenu.registerComponent(this);
039        }
040    }