mai 07

// Place text over center of icon; they both occupy the same space
button.setVerticalTextPosition(SwingConstants.CENTER);
button.setHorizontalTextPosition(SwingConstants.CENTER);

// Place text above icon
button.setVerticalTextPosition(SwingConstants.TOP);
button.setHorizontalTextPosition(SwingConstants.CENTER);

// Place text below icon
button.setVerticalTextPosition(SwingConstants.BOTTOM);
button.setHorizontalTextPosition(SwingConstants.CENTER);

// Place text to the left of icon, vertically centered
button.setVerticalTextPosition(SwingConstants.CENTER);
button.setHorizontalTextPosition(SwingConstants.LEFT);

// Place text to the left of icon and align their tops
button.setVerticalTextPosition(SwingConstants.TOP);
button.setHorizontalTextPosition(SwingConstants.LEFT);

// Place text to the left of icon and align their bottoms
button.setVerticalTextPosition(SwingConstants.BOTTOM);
button.setHorizontalTextPosition(SwingConstants.LEFT);

// Place text to the right of icon, vertically centered
button.setVerticalTextPosition(SwingConstants.CENTER);
button.setHorizontalTextPosition(SwingConstants.RIGHT);

// Place text to the right of icon and align their tops
button.setVerticalTextPosition(SwingConstants.TOP);
button.setHorizontalTextPosition(SwingConstants.RIGHT);

// Place text to the right of icon and align their bottoms
button.setVerticalTextPosition(SwingConstants.BOTTOM);
button.setHorizontalTextPosition(SwingConstants.RIGHT);

View this Post in: English French Italian Spanish

nov 26

Olá Mundo!

O primeiro post não poderia ter outro nome né. Para que não seja algo totalmente inútil, vai então uma forma de dizer “Olá Mundo” em algumas linguagens de programação que programo.

C++

#include <iostream>
int main()
{
   std::cout<<"Olá Mundo!";
   return 0;
}

PHP

<?
   echo "Olá Mundo!\n";
?>

Java

public class Hello {
    public static void main(String[] args) {
        System.out.println("Olá Mundo!");
    }
}

Algumas outras opções podem ser encontradas no Wikipedia


View this Post in: English French Italian Spanish