Search:

Type: Posts; User: DonnyWatts

Page 1 of 2 1 2

Search: Search took 0.13 seconds.

  1. Replies
    29
    Views
    6,230

    How to flip a picture using the simplest method ikn

    public static boolean copy = false;
    public static boolean turn = false;

    public static BufferedImage image = null;


    public GrafEditor() {
    try {
    image = ImageIO.read(new...
  2. Replies
    29
    Views
    6,230

    The same numbers if statement vws

    import java.awt.BorderLayout;
    import java.awt.EventQueue;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;

    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import...
  3. Replies
    29
    Views
    6,230

    Sum and export PGA

    String thisLine = null;
    String text = "";

    try{
    BufferedReader br = new BufferedReader( new FileReader( new File(("c:\\users"))));
    while ((thisLine = br.readLine()) !=...
  4. Replies
    29
    Views
    6,230

    How to choose multiple options with for loops

    import javax.swing.*;

    import java.awt.AWTException;
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Robot;
    import java.awt.color.*;
    import java.awt.event.MouseEvent;
    import...
  5. Replies
    29
    Views
    6,230

    Pyramide from squares

    import java.awt.BorderLayout;
    import java.awt.EventQueue;

    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.border.EmptyBorder;

    public class Pyramida extends JFrame {...
  6. Replies
    29
    Views
    6,230

    How to count the exact time from when you were born

    JTextArea textAreaDatum = new JTextArea();
    JTextArea textAreaCas = new JTextArea();
    JLabel lblAktualny = new JLabel("Aktu\u00E1lny \u010Das a d\u00E1tum");
    JLabel lblRokov = new...
  7. Replies
    29
    Views
    6,230

    How to get the ASCII value of a character?

    j = Integer.parseInt(DoString);

    for(i = Integer.parseInt(OdString); i<=j; i++) {
    System.out.println((char)i);
    textArea.setText(textArea.getText()+(char)i+"\n");
    }


    JFileChooser...
  8. Replies
    29
    Views
    6,230

    Sentence counter DV

    public class Sum{

    public static void main(String[] args) throws Exception {

    File file = new File("c:\\user.txt");
    BufferedReader reader = null;
    try {
    reader = new...
  9. Replies
    29
    Views
    6,230

    Arranging names and points

    String strLine;
    JTextArea textArea = new JTextArea();
    JTextArea textArea2 = new JTextArea();
    String subor = "";

    public void readData() {

    try {
    BufferedReader br = new...
  10. Replies
    29
    Views
    6,230

    Calculating simple to difficult operations

    private JPanel contentPane;
    private JTextField textField;
    float vysledok = 0;

    public Kalkulator() {
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setBounds(100, 100, 450, 300);...
  11. Replies
    29
    Views
    6,230

    Temperature sorting and changing system

    public static void main(String[] args) throws Exception {

    BufferedReader br = new BufferedReader(new FileReader(new File("c:\\users")));

    String strLine;
    int num = 0;
    float...
  12. Replies
    29
    Views
    6,230

    Parentheses checking and testing program

    public class Parentheses extends JFrame {

    private JPanel contentPane;
    private JTextField textField;
    private JButton btnOtestuj;
    private JLabel lblNewLabel;

    public static void...
  13. Replies
    29
    Views
    6,230

    Text shortening each loop TK

    String thisLine = null;
    String name= "";

    try{
    BufferedReader br = new BufferedReader( new FileReader( new File(("c:\\users"))));
    while ((thisLine = br.readLine()) !=...
  14. Replies
    29
    Views
    6,230

    Text mirroring NKN

    String thisLine = null;
    String text = "";

    try{
    BufferedReader br = new BufferedReader( new FileReader( new File(("c:\\users"))));
    while ((thisLine = br.readLine()) !=...
  15. Replies
    29
    Views
    6,230

    Stone loop resetting integers

    How can I reset both integers me and pc once I have used them?



    int random = 0;
    int me = 0;
    int pc = 0;

    public void vyber(int typ) {
    random = (int) (Math.random() * 3 + 0);
  16. Replies
    29
    Views
    6,230

    Multiple arrays with changing colors I

    public class ListColor extends JFrame {
    Color[] farby = {Color.RED, Color.YELLOW, Color.BLUE, Color.GRAY, Color.GREEN, Color.ORANGE, Color.BLACK};

    private JPanel contentPane;
    private JPanel...
  17. Replies
    29
    Views
    6,230

    Multipling with dots and prime number creator I

    JPanel panel = new JPanel(){

    public void paint(Graphics g) {

    int rad = Integer.parseInt(textA1.getText());
    int stlp = Integer.parseInt(textA2.getText());

    for(int...
  18. Replies
    29
    Views
    6,230

    Checkerboard style background

    public void paint(Graphics g) {

    for(int j = 0; j<4; j++)
    {

    for(int i = 0; i<8; i++)
    {
    if(i%2==0) {
    g.setColor(Color.red);
    }else {
  19. Replies
    29
    Views
    6,230

    Caesar cipher

    String word = "Hello";
    String code = "";

    for(int i = 0; i < word.length(); i++) {
    char cipher = (char) (word.charAt(i)+2);
    code = code+Character.toString(cipher);
    }
    ...
  20. Replies
    29
    Views
    6,230

    Finder and replacer s

    public void mouseClicked(MouseEvent e) {

    String sentence = textArea.getText();
    String find = textVyhl.getText();

    for(String st : sentence.split(" ")){
    if(st.indexOf(find)!=-1){...
  21. Replies
    29
    Views
    6,230

    Simple Text editor TS

    btnSave.addMouseListener(new MouseAdapter() {
    @Override
    public void mouseClicked(MouseEvent arg0) {
    String text = textArea.getText();
    JFileChooser chooser = new JFileChooser();...
  22. Replies
    29
    Views
    6,230

    Computing greatest common divisor - euclids algorithm

    public class EuclidAlg {

    public static int NSD (int a, int b) {

    if(a>b) {
    return NSD(a-b,b);
    }
    if(a<b) {
    return NSD(a,b-a);
    }
  23. Replies
    29
    Views
    6,230

    Bubble sort simplest sorting algorithm

    public class BubbleSort {

    public static int[] bubblesort(int [] array) {

    for(int i = 0; i < array.length - 1; i++) {

    for (int j = 0; j <array.length - i - 1; j++) {
    ...
  24. Replies
    29
    Views
    6,230

    Sum of vowels pz

    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileReader;
    import java.io.InputStreamReader;

    public class Sum{

    public static void...
  25. Replies
    29
    Views
    6,230

    From binary to decimal

    public class FromBin{

    public static int power(int number, int exp){

    int k=1;
    for(int i=1; i<=exp;i++) {
    k*=number;
    }
    return(k);
    }
Results 1 to 25 of 30
Page 1 of 2 1 2