¡@

Home 

java Programming Glossary: font

non resizable window border and positioning

http://stackoverflow.com/questions/12529200/non-resizable-window-border-and-positioning

good on your platform. Suppose the user's platform has a font with different say larger FontMetrics . This example is somewhat.. text is visible regardless of the host platform's default font. import java.awt.BorderLayout import java.awt.EventQueue import..

Re-paint problem on translucent frame/panel/component

http://stackoverflow.com/questions/2163544/re-paint-problem-on-translucent-frame-panel-component

private static final int H 100 private static final Font font new Font Serif Font.PLAIN 48 private static final SimpleDateFormat.. h2 null private void renderTime Graphics2D g2d g2d.setFont font String s df.format now FontMetrics fm g2d.getFontMetrics int.. RenderingHints.VALUE_ANTIALIAS_ON timeG.setFont font timeG.setComposite AlphaComposite.Clear timeG.fillRect 0 0..

Custom fonts and XML layouts (Android)

http://stackoverflow.com/questions/2376250/custom-fonts-and-xml-layouts-android

fonts and XML layouts Android I'm trying to define a GUI layout.. is no way to specify that your widgets should use a custom font e.g. one you've placed in assets font in XML files and you can.. should use a custom font e.g. one you've placed in assets font in XML files and you can only use the system installed fonts...

How to deal with “java.lang.OutOfMemoryError: Java heap space” error (64MB heap size)

http://stackoverflow.com/questions/37335/how-to-deal-with-java-lang-outofmemoryerror-java-heap-space-error-64mb-heap

I am writing a client side Swing application graphical font designer on Java 5. Recently I am running into java.lang.OutOfMemoryError..

uploading of pdf file

http://stackoverflow.com/questions/5038798/uploading-of-pdf-file

uppercased tags. This is discouraged. The HTML is using font and center tags which are deprecated since 1998. The business..

How to calculate the number of rows (and columns in each row) a text takes in a JTextArea?

http://stackoverflow.com/questions/5979795/how-to-calculate-the-number-of-rows-and-columns-in-each-row-a-text-takes-in-a

Apparent from this is that we have different default fonts. And the problem in fact might be either font or even system.. default fonts. And the problem in fact might be either font or even system dependent. PS I am on Win7 . line Twas brillig.. bounds pretty well for the widest line. This varies by font due to proportional spacing. TextLayout shows even tighter bounds..

Painting the slider icon of JSlider

http://stackoverflow.com/questions/6992633/painting-the-slider-icon-of-jslider

UTF 8 synth style id backingStyle opaque value TRUE font name Dialog size 12 state color value WHITE type BACKGROUND..

How to find a button source in AWT (calculator homework)

http://stackoverflow.com/questions/7441625/how-to-find-a-button-source-in-awt-calculator-homework

gui.add text BorderLayout.NORTH io new JTextField 15 Font font io.getFont font font.deriveFont font.getSize 1.7f io.setFont.. io new JTextField 15 Font font io.getFont font font.deriveFont font.getSize 1.7f io.setFont font io.setHorizontalAlignment.. io new JTextField 15 Font font io.getFont font font.deriveFont font.getSize 1.7f io.setFont font io.setHorizontalAlignment..

Stretch a JLabel text

http://stackoverflow.com/questions/8281886/stretch-a-jlabel-text

that could work It involved calculating and setting the font size so it appears the right height. I would have also have.. import java.awt.RenderingHints import java.awt.font.FontRenderContext import java.awt.font.TextLayout import java.awt.image.BufferedImage.. import java.awt.font.FontRenderContext import java.awt.font.TextLayout import java.awt.image.BufferedImage import javax.swing.JFrame..

Re-paint problem on translucent frame/panel/component

http://stackoverflow.com/questions/2163544/re-paint-problem-on-translucent-frame-panel-component

javax.swing.JLabel import java.awt.Color import java.awt.Font import java.util.Timer import java.util.TimerTask public class.. 0.0f 0.0f 0.3f final JLabel label new JLabel Hola label.setFont new Font label.getFont .getFamily Font.PLAIN 46 label.setForeground.. 0.3f final JLabel label new JLabel Hola label.setFont new Font label.getFont .getFamily Font.PLAIN 46 label.setForeground Color.white..

Using Graphics2D to overlay text on a BufferedImage and return a BufferedImage

http://stackoverflow.com/questions/2658554/using-graphics2d-to-overlay-text-on-a-bufferedimage-and-return-a-bufferedimage

gO image.createGraphics gO.setColor Color.red gO.setFont new Font SansSerif Font.BOLD 12 gO.drawString this.text this.x.. image.createGraphics gO.setColor Color.red gO.setFont new Font SansSerif Font.BOLD 12 gO.drawString this.text this.x this.y.. gO.setColor Color.red gO.setFont new Font SansSerif Font.BOLD 12 gO.drawString this.text this.x this.y System.err.println..

JFormattedTextField is not properly cleared

http://stackoverflow.com/questions/4148336/jformattedtextfield-is-not-properly-cleared

private static final int BASE SIZE 32 private static final Font FONT new Font Serif Font.BOLD SIZE private JPopupMenu popup.. final int BASE SIZE 32 private static final Font FONT new Font Serif Font.BOLD SIZE private JPopupMenu popup new JPopupMenu.. BASE SIZE 32 private static final Font FONT new Font Serif Font.BOLD SIZE private JPopupMenu popup new JPopupMenu private Digit..

Java2D Graphics anti-aliased

http://stackoverflow.com/questions/4285464/java2d-graphics-anti-aliased

createNameOnButton String label int messageWidth 0 Font font new Font Arial Font.PLAIN 11 BufferedImage bi new BufferedImage.. String label int messageWidth 0 Font font new Font Arial Font.PLAIN 11 BufferedImage bi new BufferedImage 10 10.. String label int messageWidth 0 Font font new Font Arial Font.PLAIN 11 BufferedImage bi new BufferedImage 10 10 BufferedImage.TYPE_INT_RGB..

Is it possible to have an autocomplete using jtextfield and a Jlist?

http://stackoverflow.com/questions/7255636/is-it-possible-to-have-an-autocomplete-using-jtextfield-and-a-jlist

Eee Fff None of the above someTextField.setFont new Font Serif Font.BOLD 16 someTextField.setForeground Color.black.. Eee Fff None of the above someTextField.setFont new Font Serif Font.BOLD 16 someTextField.setForeground Color.black someTextField.setBackground.. None of the above someTextField.setFont new Font Serif Font.BOLD 16 someTextField.setForeground Color.black someTextField.setBackground..

How to find a button source in AWT (calculator homework)

http://stackoverflow.com/questions/7441625/how-to-find-a-button-source-in-awt-calculator-homework

1 3 3 gui.add text BorderLayout.NORTH io new JTextField 15 Font font io.getFont font font.deriveFont font.getSize 1.7f io.setFont.. BorderLayout.NORTH io new JTextField 15 Font font io.getFont font font.deriveFont font.getSize 1.7f io.setFont font io.setHorizontalAlignment.. io new JTextField 15 Font font io.getFont font font.deriveFont font.getSize 1.7f io.setFont font io.setHorizontalAlignment..

Update JLabel every X seconds from ArrayList<List> - Java

http://stackoverflow.com/questions/7943584/update-jlabel-every-x-seconds-from-arraylistlist-java

JTextField 5 _textField.setEditable false _textField.setFont new Font sansserif Font.PLAIN 30 JPanel content new JPanel content.setLayout.. 5 _textField.setEditable false _textField.setFont new Font sansserif Font.PLAIN 30 JPanel content new JPanel content.setLayout.. false _textField.setFont new Font sansserif Font.PLAIN 30 JPanel content new JPanel content.setLayout new FlowLayout..

Stretch a JLabel text

http://stackoverflow.com/questions/8281886/stretch-a-jlabel-text

text is imaged using TextLayout using a suitably large Font size and scaled to fill the component. There's a related example.. import java.awt.EventQueue import java.awt.Font import java.awt.Graphics import java.awt.Graphics2D import java.awt.Rectangle.. import java.awt.RenderingHints import java.awt.font.FontRenderContext import java.awt.font.TextLayout import java.awt.image.BufferedImage..

Passing current Date

http://stackoverflow.com/questions/8614972/passing-current-date

250 250 150 setForeground new Color 250 250 150 setFont new Font Serif Font.BOLD 9 else if Pattern.compile 1 .matcher.. 150 setForeground new Color 250 250 150 setFont new Font Serif Font.BOLD 9 else if Pattern.compile 1 .matcher str .find.. new Color 250 250 150 setFont new Font Serif Font.BOLD 9 else if Pattern.compile 1 .matcher str .find setBackground..