Daymon development stuff ye?

Messages
7,409
Reaction score
17,206
Points
900
Location
IKEA - Northern Europe
Recently started with java, know as much as Alex_:D knows about maths which is basically nothing, did this today with help of a tutorial, hopefully I should be able to make one without a tutorial soon enough

Code:
package com.codebind;

import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * Created by daymon on 2016-12-02.
 */
public class App {
    private JButton button_msg;
    private JPanel panelMain;

    public App() {
        button_msg.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                JOptionPane.showMessageDialog(null,"yes and im bad");
            }
        });
    }

    public static void main(String[] args) {
        JFrame frame = new JFrame("retard test");
        frame.setContentPane(new App().panelMain);
        frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
        frame.pack();
        frame.setVisible(true);
    }
}
 

M

Messages
2,495
Reaction score
8,546
Points
340
know as much as Alex_:D knows about maths which is basically nothing,

jUX63if.png
 
Messages
901
Reaction score
2,533
Points
790
Location
Netherlands
If I may just give some advise, it's generally good to keep your variables very, very descriptive on what it does, e.g. button_msg can mean a lot of things, a better name would e.g. be button_retard, or even better buttonRetard.

It is generally good to follow a camelCase pattern, although in C# I personally prefer UpperCamelCase.
 
Top