Jump to content

Search the Community

Showing results for tags 'notepad'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • RuneLocus
    • News & Announcements
    • Information Booth
    • Website Support
    • Introductions
    • Chat
    • Forum Games
  • RuneScape Development
    • RSPS General
    • RuneScape Private Server (RS2)
    • RuneScape Private Server (503+)
    • RuneScape Private Server (EoC 742+)
  • Other
    • Digital Art
    • Gaming
    • Webdevelopment
    • Computers
  • Marketplace
    • RuneScape Market
    • RSPS Market
    • Others Market
    • Freelance Middleman Services
  • Super Secret Club's Topics

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Found 3 results

  1. I did this for practicing and such. It looks pretty good and I'm pretty proud of it. More could be done to it but cbf to try xD Enjoy :P [code] import java.awt.*; import java.awt.datatransfer.*; import java.awt.event.*; import javax.swing.*; public class Notepad extends JFrame { private static final long serialVersionUID = 7183220646290351085L; private JMenuBar menuBar; private JMenu file; private JMenu edit; private JMenu format; private JMenu view; private JMenu help; private JMenuItem exit; private JMenuItem copy; private JMenuItem paste; private JMenuItem delete; private JMenuItem selectAll; private JMenuItem font; private JMenuItem size; private JMenuItem statusBar; private JMenuItem viewHelp; private JMenuItem about; private JTextArea pad; private JScrollPane scroll; private String setFont = ""; private int setSize = 13; public static void main(String[] args) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { e.printStackTrace(); } new Notepad(); } private Notepad() { super("Untitled - Notepad"); sendMenuBar(); sendPad(); try { Thread.sleep(500); } catch (InterruptedException e) { e.printStackTrace(); } sendUIDefaults(this); } private void sendUIDefaults(Notepad pad) { pad.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); pad.setSize(800, 450); pad.setLocationRelativeTo(null); pad.setVisible(true); } private void sendMenuBar() { menuBar = new JMenuBar(); file = new JMenu(" File "); exit = new JMenuItem("Exit"); exit.addActionListener(new ActionListener() { [MENTION=15855]Over[/MENTION]ride public void actionPerformed(ActionEvent e) { handleClose(); } }); edit = new JMenu(" Edit "); copy = new JMenuItem("Copy"); copy.addActionListener(new ActionListener() { [MENTION=15855]Over[/MENTION]ride public void actionPerformed(ActionEvent e) { handleCopy(); } }); paste = new JMenuItem("Paste"); paste.addActionListener(new ActionListener() { [MENTION=15855]Over[/MENTION]ride public void actionPerformed(ActionEvent e) { handlePaste(); } }); delete = new JMenuItem("Delete"); delete.addActionListener(new ActionListener() { [MENTION=15855]Over[/MENTION]ride public void actionPerformed(ActionEvent e) { handleDelete(); } }); selectAll = new JMenuItem("Select All"); selectAll.addActionListener(new ActionListener() { [MENTION=15855]Over[/MENTION]ride public void actionPerformed(ActionEvent e) { handleSelectAll(); } }); format = new JMenu(" Format "); font = new JMenuItem("Text Font"); font.addActionListener(new ActionListener() { [MENTION=15855]Over[/MENTION]ride public void actionPerformed(ActionEvent e) { handleSetFont(); } }); size = new JMenuItem("Text Size"); size.addActionListener(new ActionListener() { [MENTION=15855]Over[/MENTION]ride public void actionPerformed(ActionEvent e) { handleSetSize(); } }); view = new JMenu(" View "); statusBar = new JMenuItem("Status Bar"); statusBar.addActionListener(new ActionListener() { [MENTION=15855]Over[/MENTION]ride public void actionPerformed(ActionEvent e) { handleStatusBar(); } }); help = new JMenu(" Help "); viewHelp = new JMenuItem("View Help"); viewHelp.addActionListener(new ActionListener() { [MENTION=15855]Over[/MENTION]ride public void actionPerformed(ActionEvent e) { handleViewHelp(); } }); about = new JMenuItem("About Notepad"); about.addActionListener(new ActionListener() { [MENTION=15855]Over[/MENTION]ride public void actionPerformed(ActionEvent e) { handleAboutNotepad(); } }); setJMenuBar(menuBar); file.add(exit); edit.add(copy); edit.add(paste); edit.add(delete); edit.add(selectAll); format.add(font); format.add(size); view.add(statusBar); help.add(viewHelp); help.add(about); menuBar.add(file); menuBar.add(edit); menuBar.add(format); menuBar.add(view); menuBar.add(help); } private void sendPad() { pad = new JTextArea(); scroll = new JScrollPane(pad); pad.setFont(new Font("Lucida Console", Font.PLAIN, 13)); scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); add(scroll); } private void handleClose() { if (!pad.getText().isEmpty()) { int answer = JOptionPane.showConfirmDialog(null, "Are you sure you wish to exit?", "Notepad", JOptionPane.YES_NO_OPTION); if (answer == JOptionPane.YES_OPTION) System.exit(0); return; } System.exit(0); } private void handleCopy() { String theString = pad.getSelectedText(); StringSelection selection = new StringSelection(theString); Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); clipboard.setContents(selection, selection); } private void handlePaste() { Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard(); Transferable transferable = clipboard.getContents(this); try { pad.append((String) transferable.getTransferData(DataFlavor.stringFlavor)); } catch (Exception e){ e.printStackTrace(); } } private void handleDelete() { pad.setText(pad.getText().replace(pad.getSelectedText(), "")); } private void handleSelectAll() { pad.selectAll(); } private void handleSetFont() { String font = JOptionPane.showInputDialog(null, "Please enter a font to use.", "Notepad", JOptionPane.OK_CANCEL_OPTION); if (font.isEmpty()) { return; } setSetFont(font); pad.setFont(new Font(getSetFont(), Font.PLAIN, getSetSize())); } private void handleSetSize() { String size = JOptionPane.showInputDialog(null, "Please enter a text size to use.", "Notepad", JOptionPane.OK_CANCEL_OPTION); if (size.isEmpty()) { return; } setSetSize(Integer.parseInt(size)); pad.setFont(new Font(getSetFont(), Font.PLAIN, getSetSize())); } private void handleStatusBar() { // Not really useful but kk } private void handleViewHelp() { JOptionPane.showMessageDialog(null, "There are currently no help topics to view.", "Notepad", JOptionPane.INFORMATION_MESSAGE, null); } private void handleAboutNotepad() { JOptionPane.showMessageDialog(null, "Notepad - Copyright (c) _Jordan 2014", "Notepad", JOptionPane.INFORMATION_MESSAGE, null); } public String getSetFont() { return setFont; } public void setSetFont(String setFont) { this.setFont = setFont; } public int getSetSize() { return setSize; } public void setSetSize(int setSize) { this.setSize = setSize; } } [/code] [IMG]http://i.imgur.com/MALTvLj.png[/IMG]
  2. I didn't mean to click the box that made notepad the default .class file opener. Now my .class files won't work. I'm unable to run clients anymore due to this. Is there any way I can reset them to files without default programs? Is there a program that I could use as the default program?
  3. This is a simple tutorial, to show how to edit a few BASIC things. [spoiler='Client IP and Port editing']BOTH of these are going to be located at client>src>client.Java OR client>src>ClientSettings.Java --- WHERE they are located in the file depends on the client, most are set default to push ctrl + f and type to find and edit it. Most default ports are 43594.[/spoiler] [spoiler='Client title and load bar (MOST)']This will be located in ClientSettings.Java Just push ctrl + f and search the server source's name you have I.E. CloudIn, then replace it with your server's name.[/spoiler] [spoiler='removing client title stuff like "by dragonkk"']This is in Applet_Sub1.Java. Just search whatever text is not edited through ClientSettings, like "by Dragonkk"[/spoiler] Yeah, its a basic and pretty crappy tutorial but I am too tired to make an in-depth one with pics and more detail, no flaming plz? :)