List of usage examples for java.awt Font BOLD
int BOLD
To view the source code for java.awt Font BOLD.
Click Source Link
From source file:loansystem.visual.panel.StartPage.java
private void dibujarGrafico(DefaultCategoryDataset datos, int tipoGrafico, String titulo, String ejeX, String ejeY, PlotOrientation orientacion, JPanel contenedor) { JFreeChart grafica = null;//from ww w.j a va2s . c o m switch (tipoGrafico) { case BAR: grafica = ChartFactory.createBarChart3D(titulo, ejeX, ejeY, datos, orientacion, true, true, false); break; case LINE: break; case PIE: break; } grafica.getTitle().setPaint(Color.black); CategoryPlot p = grafica.getCategoryPlot(); p.setRangeGridlinePaint(Color.black); CategoryItemRenderer renderer = ((CategoryPlot) grafica.getPlot()).getRenderer(); renderer.setBaseItemLabelGenerator(new StandardCategoryItemLabelGenerator()); renderer.setBaseItemLabelsVisible(true); ItemLabelPosition position = new ItemLabelPosition(ItemLabelAnchor.OUTSIDE12, TextAnchor.BASELINE_CENTER); renderer.setBasePositiveItemLabelPosition(position); int style = Font.BOLD; Font font = new Font("Tahoma", style, 12); renderer.setItemLabelFont(font); ChartPanel panel = new ChartPanel(grafica); contenedor.add(panel); contenedor.revalidate(); contenedor.repaint(); }
From source file:net.sf.dynamicreports.test.jasper.chart.TimeSeriesChartTest.java
@Override public void test() { super.test(); numberOfPagesTest(1);/* w ww .ja va2 s . com*/ JFreeChart chart = getChart("summary.chart1", 0); XYItemRenderer renderer = chart.getXYPlot().getRenderer(); Assert.assertEquals("renderer", XYLineAndShapeRenderer.class, renderer.getClass()); Assert.assertFalse("show shapes", ((XYLineAndShapeRenderer) renderer).getBaseShapesVisible()); Assert.assertFalse("show lines", ((XYLineAndShapeRenderer) renderer).getBaseLinesVisible()); chart = getChart("summary.chart2", 0); Axis axis = chart.getXYPlot().getDomainAxis(); Assert.assertEquals("category label", "time", axis.getLabel()); Assert.assertEquals("category label color", Color.BLUE, axis.getLabelPaint()); Assert.assertEquals("category label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont()); Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint()); Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont()); Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint()); Assert.assertTrue("vertical tick labels", ((ValueAxis) axis).isVerticalTickLabels()); chart = getChart("summary.chart3", 0); axis = chart.getXYPlot().getRangeAxis(); Assert.assertEquals("value label", "value", axis.getLabel()); Assert.assertEquals("value label color", Color.BLUE, axis.getLabelPaint()); Assert.assertEquals("value label font", new Font("Arial", Font.BOLD, 10), axis.getLabelFont()); Assert.assertEquals("tick label color", Color.CYAN, axis.getTickLabelPaint()); Assert.assertEquals("tick label font", new Font("Arial", Font.ITALIC, 10), axis.getTickLabelFont()); Assert.assertEquals("tick label mask", "10.00", ((NumberAxis) axis).getNumberFormatOverride().format(10)); //Assert.assertEquals("line color", Color.LIGHT_GRAY, axis.getAxisLinePaint()); Assert.assertEquals("range min value", 1d, ((ValueAxis) axis).getLowerBound()); Assert.assertEquals("range max value", 15d, ((ValueAxis) axis).getUpperBound()); Assert.assertTrue("vertical tick labels", ((ValueAxis) axis).isVerticalTickLabels()); }
From source file:com.tascape.qa.th.android.tools.UiAutomatorViewer.java
private void start() throws Exception { SwingUtilities.invokeLater(() -> { jd = new ViewerParameterDialog("Launch Android App"); JPanel jpParameters = new JPanel(); jpParameters.setLayout(new BoxLayout(jpParameters, BoxLayout.PAGE_AXIS)); jd.setParameterPanel(jpParameters); {/*w w w . jav a 2 s. co m*/ JPanel jp = new JPanel(); jpParameters.add(jp); jp.setLayout(new BoxLayout(jp, BoxLayout.LINE_AXIS)); jp.add(new JLabel("Devices")); jp.add(jcbDevices); } { JPanel jp = new JPanel(); jpParameters.add(jp); jp.setLayout(new BoxLayout(jp, BoxLayout.LINE_AXIS)); jp.add(new JLabel("App Package Name")); jp.add(jtfApp); if (StringUtils.isNotEmpty(appPackageName)) { jtfApp.setText(appPackageName); } jtfApp.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { if (e.getKeyCode() == KeyEvent.VK_ENTER) { jbLaunch.doClick(); } } }); } { JPanel jp = new JPanel(); jpParameters.add(jp); jp.setLayout(new BoxLayout(jp, BoxLayout.LINE_AXIS)); jp.add(new JLabel("Interaction time (minute)")); jsDebugMinutes.getEditor().setEnabled(false); jp.add(jsDebugMinutes); } { JPanel jp = new JPanel(); jpParameters.add(jp); jp.setLayout(new BoxLayout(jp, BoxLayout.LINE_AXIS)); jp.add(Box.createRigidArea(new Dimension(518, 2))); } JPanel jpAction = new JPanel(); jd.setActionPanel(jpAction); jpAction.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); jpAction.setLayout(new BoxLayout(jpAction, BoxLayout.LINE_AXIS)); jbLaunch.setFont(jbLaunch.getFont().deriveFont(Font.BOLD)); jbLaunch.setBorder(BorderFactory.createEtchedBorder()); jbLaunch.setEnabled(false); jpAction.add(jbLaunch); jbLaunch.addActionListener(event -> { new Thread() { @Override public void run() { launchApp(); } }.start(); }); jd.showDialog(); new Thread() { @Override public void run() { try { detectDevices(); } catch (Exception ex) { throw new RuntimeException(ex); } } }.start(); }); }
From source file:org.jfree.chart.demo.SurveyResultsDemo3.java
/** * Creates a chart.//from w ww .j av a 2 s . com * * @param dataset the dataset. * * @return The chart. */ private JFreeChart createChart(final CategoryDataset dataset) { final JFreeChart chart = ChartFactory.createBarChart(null, // chart title null, // domain axis label null, // range axis label dataset, // data PlotOrientation.HORIZONTAL, // orientation false, // include legend true, false); chart.setBackgroundPaint(Color.white); chart.getPlot().setOutlinePaint(null); final TextTitle title = new TextTitle("Figure 6 | Overall SEO Rating"); title.setHorizontalAlignment(HorizontalAlignment.LEFT); title.setBackgroundPaint(Color.red); title.setPaint(Color.white); chart.setTitle(title); final CategoryPlot plot = chart.getCategoryPlot(); final ValueAxis rangeAxis = plot.getRangeAxis(); rangeAxis.setRange(0.0, 4.0); rangeAxis.setVisible(false); final ExtendedCategoryAxis domainAxis = new ExtendedCategoryAxis(null); domainAxis.setTickLabelFont(new Font("SansSerif", Font.BOLD, 12)); domainAxis.setCategoryMargin(0.30); domainAxis.addSubLabel("Sm.", "(10)"); domainAxis.addSubLabel("Med.", "(10)"); domainAxis.addSubLabel("Lg.", "(10)"); domainAxis.addSubLabel("All", "(10)"); final CategoryLabelPositions p = domainAxis.getCategoryLabelPositions(); final CategoryLabelPosition left = new CategoryLabelPosition(RectangleAnchor.LEFT, TextBlockAnchor.CENTER_LEFT); domainAxis.setCategoryLabelPositions(CategoryLabelPositions.replaceLeftPosition(p, left)); plot.setDomainAxis(domainAxis); final BarRenderer renderer = (BarRenderer) plot.getRenderer(); renderer.setSeriesPaint(0, new Color(0x9C, 0xA4, 0x4A)); renderer.setBaseOutlineStroke(null); // final StandardCategoryLabelGenerator generator = new StandardCategoryLabelGenerator( // "{2}", new DecimalFormat("0.00") // ); // renderer.setLabelGenerator(generator); renderer.setItemLabelsVisible(true); renderer.setItemLabelFont(new Font("SansSerif", Font.PLAIN, 18)); final ItemLabelPosition position = new ItemLabelPosition(ItemLabelAnchor.INSIDE3, TextAnchor.CENTER_RIGHT); renderer.setPositiveItemLabelPosition(position); renderer.setPositiveItemLabelPositionFallback(new ItemLabelPosition()); return chart; }
From source file:edu.ucla.stat.SOCR.analyses.gui.ConfidenceIntervalAnalysis.java
/**Initialize the Analysis*/ public void init() { mapIndep = false;//from ww w . j a va 2s . co m INPUT = "CI SETTINGS"; showSelect = false; showVisualize = false; confidenceControlPanel = new ConfidenceControlPanel(this); confidenceControlPanel.setPreferredSize(new Dimension(200, 200)); confidenceControlPanel.addObserver(this); super.init(); analysisType = AnalysisType.CI; useInputExample = false; useLocalExample = false; useRandomExample = true; useServerExample = false; useStaticExample = CIExamples.availableExamples; onlineDescription = ""; depLabel.setText(VARIABLE); depMax = 100; // max number of dependent var indMax = 1; // max number of independent var resultPanelTextArea.setFont(new Font(outputFontFace, Font.BOLD, outputFontSize)); getFrame(this); analysisName = "Confidence Interval"; setName(analysisName); // Create the toolBar toolBar = new JToolBar(); createActionComponents(toolBar); this.getContentPane().add(toolBar, BorderLayout.NORTH); resetGraph(); validate(); //reset(); }
From source file:com.tinypace.mobistore.servlet.ValidateCodeServlet.java
private String createCharacter(Graphics g) { char[] codeSeq = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', '8', '9' }; String[] fontTypes = { "\u5b8b\u4f53", "\u65b0\u5b8b\u4f53", "\u9ed1\u4f53", "\u6977\u4f53", "\u96b6\u4e66" }; Random random = new Random(); StringBuilder s = new StringBuilder(); for (int i = 0; i < 4; i++) { String r = String.valueOf(codeSeq[random.nextInt(codeSeq.length)]);//random.nextInt(10)); g.setColor(new Color(50 + random.nextInt(100), 50 + random.nextInt(100), 50 + random.nextInt(100))); g.setFont(new Font(fontTypes[random.nextInt(fontTypes.length)], Font.BOLD, 26)); g.drawString(r, 15 * i + 5, 19 + random.nextInt(8)); s.append(r);//from w ww . j a va 2 s . co m } return s.toString(); }
From source file:edu.kit.dama.ui.components.TextImage.java
/** * Get the bytes of the final image.//www. j a va 2 s. co m * * @return The byte array containing the bytes of the resulting image. * * @throws IOException if creating the image fails. */ public byte[] getBytes() throws IOException { Image transparentImage = Toolkit.getDefaultToolkit().createImage(new FilteredImageSource( new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB).getSource(), new RGBImageFilter() { @Override public final int filterRGB(int x, int y, int rgb) { return (rgb << 8) & 0xFF000000; } })); //create the actual image and overlay it by the transparent background BufferedImage outputImage = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB); Graphics2D g2d = outputImage.createGraphics(); g2d.drawImage(transparentImage, 0, 0, null); //draw the remaining stuff g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); g2d.setColor(color); g2d.fillRoundRect(0, 0, size, size, 20, 20); g2d.setColor(new Color(Math.round((float) color.getRed() * .9f), Math.round((float) color.getGreen() * .9f), Math.round((float) color.getBlue() * .9f))); g2d.drawRoundRect(0, 0, size - 1, size - 1, 20, 20); Font font = new Font("Dialog", Font.BOLD, size - 4); g2d.setFont(font); g2d.setColor(Color.WHITE); String s = text.toUpperCase().substring(0, 1); FontMetrics fm = g2d.getFontMetrics(); float x = ((float) size - (float) fm.stringWidth(s)) / 2f; float y = ((float) fm.getAscent() + (float) ((float) size - ((float) fm.getAscent() + (float) fm.getDescent())) / 2f) - 1f; g2d.drawString(s, x, y); ByteArrayOutputStream bout = new ByteArrayOutputStream(); ImageIO.write(outputImage, "png", bout); g2d.dispose(); return bout.toByteArray(); }
From source file:StoppUhr.java
private void initGUI() { try {/*from ww w .ja va 2 s .c o m*/ AnchorLayout thisLayout = new AnchorLayout(); getContentPane().setLayout(thisLayout); setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); this.setPreferredSize(new java.awt.Dimension(609, 394)); { jPanel3 = new JPanel(); GridBagLayout jPanel3Layout = new GridBagLayout(); jPanel3.setLayout(jPanel3Layout); getContentPane().add(jPanel3, new AnchorConstraint(668, 811, 978, 19, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL)); jPanel3.setPreferredSize(new java.awt.Dimension(384, 94)); { jScrollPane1 = new JScrollPane(); jPanel3.add(jScrollPane1, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jScrollPane1.setPreferredSize(new java.awt.Dimension(300, 90)); { jTextArea = new JTextArea(); jScrollPane1.setViewportView(jTextArea); jTextArea.setText(""); } } { jTextFieldStNr = new JTextField(); jPanel3.add(jTextFieldStNr, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jTextFieldStNr.setText(""); jTextFieldStNr.setPreferredSize(new java.awt.Dimension(150, 90)); jTextFieldStNr.setHorizontalAlignment(JTextField.CENTER); jTextFieldStNr.setFont(new Font(Font.DIALOG, Font.BOLD, 40)); } jPanel3Layout.rowWeights = new double[] { 0.1 }; jPanel3Layout.rowHeights = new int[] { 7 }; jPanel3Layout.columnWeights = new double[] { 0.1, 0.1 }; jPanel3Layout.columnWidths = new int[] { 7, 7 }; } { jPanel2 = new JPanel(); GridBagLayout jPanel2Layout = new GridBagLayout(); jPanel2Layout.rowWeights = new double[] { 0.1, 0.1 }; jPanel2Layout.rowHeights = new int[] { 7, 7 }; jPanel2Layout.columnWeights = new double[] { 0.1 }; jPanel2Layout.columnWidths = new int[] { 7 }; jPanel2.setLayout(jPanel2Layout); getContentPane().add(jPanel2, new AnchorConstraint(47, 821, 721, 27, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL)); jPanel2.setPreferredSize(new java.awt.Dimension(363, 178)); { uhrzeitAusgabe = new JLabel(); jPanel2.add(uhrzeitAusgabe, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); uhrzeitAusgabe.setText("00:00:00"); uhrzeitAusgabe.setFont(new Font(Font.DIALOG, Font.BOLD, uhrFontSize)); } { stoppuhrAusgabe = new JLabel(); jPanel2.add(stoppuhrAusgabe, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); stoppuhrAusgabe.setText("00:00:00"); stoppuhrAusgabe.setFont(new Font(Font.DIALOG, Font.BOLD, uhrFontSize)); } } { jPanel1 = new JPanel(); GridBagLayout jPanel1Layout = new GridBagLayout(); getContentPane().add(jPanel1, new AnchorConstraint(48, 987, 954, 820, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL, AnchorConstraint.ANCHOR_REL)); jPanel1Layout.rowWeights = new double[] { 0.1, 0.1, 0.1, 1.0, 0.1 }; jPanel1Layout.rowHeights = new int[] { 1, 1, 1, 1, 1 }; jPanel1Layout.columnWeights = new double[] { 0.1 }; jPanel1Layout.columnWidths = new int[] { 7 }; jPanel1.setLayout(jPanel1Layout); jPanel1.setPreferredSize(new java.awt.Dimension(100, 330)); { startButton = new JButton(); jPanel1.add(startButton, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); startButton.setPreferredSize(new java.awt.Dimension(90, 30)); startButton.setText("Start"); } { resetButton = new JButton(); jPanel1.add(resetButton, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); resetButton.setText("Reset"); resetButton.setPreferredSize(new java.awt.Dimension(90, 30)); } { jPanel4 = new JPanel(); GridBagLayout jPanel4Layout = new GridBagLayout(); jPanel1.add(jPanel4, new GridBagConstraints(0, 4, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jPanel4.setPreferredSize(new java.awt.Dimension(51, 81)); jPanel4Layout.rowWeights = new double[] { 0.1, 0.1, 0.1 }; jPanel4Layout.rowHeights = new int[] { 7, 7, 7 }; jPanel4Layout.columnWeights = new double[] { 0.1 }; jPanel4Layout.columnWidths = new int[] { 7 }; jPanel4.setLayout(jPanel4Layout); { plusButton = new JButton(); jPanel4.add(plusButton, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); plusButton.setText("+"); plusButton.setPreferredSize(new java.awt.Dimension(50, 30)); } { minusButton = new JButton(); jPanel4.add(minusButton, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); minusButton.setText("-"); minusButton.setPreferredSize(new java.awt.Dimension(50, 30)); } { jLabelFontSize = new JLabel(); jPanel4.add(jLabelFontSize, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0)); jLabelFontSize.setFont(new Font(Font.DIALOG, Font.PLAIN, 10)); jLabelFontSize.setText("Font Size"); } } } this.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent evt) { thisWindowClosing(evt); } }); startButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { startButtonListener(evt); } }); resetButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { resetButtonListener(evt); } }); jTextFieldStNr.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { try { stNrFieldListener(evt); } catch (IOException e) { e.printStackTrace(); } } }); plusButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { plusButtonListener(evt); } }); minusButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { minusButtonListener(evt); } }); pack(); this.setSize(609, 394); } catch (Exception e) { //add your error handling code here e.printStackTrace(); } }
From source file:com.floreantpos.ui.views.LoginView.java
private JPanel createCenterPanel() { lblTerminalId = new JLabel(Messages.getString("LoginView.0")); //$NON-NLS-1$ lblTerminalId.setForeground(Color.BLACK); lblTerminalId.setFont(new Font("Dialog", Font.BOLD, PosUIManager.getFontSize(18))); //$NON-NLS-1$ lblTerminalId.setHorizontalAlignment(SwingConstants.CENTER); mainPanel = new JPanel(new BorderLayout()); mainPanel.add(lblTerminalId, BorderLayout.NORTH); btnSwitchBoard = new PosButton(POSConstants.ORDERS); btnKitchenDisplay = new PosButton(POSConstants.KITCHEN_DISPLAY_BUTTON_TEXT); btnDriverView = new PosButton("DRIVER VIEW"); btnConfigureDatabase = new PosButton(POSConstants.CONFIGURE_DATABASE); btnBackOffice = new PosButton(POSConstants.BACK_OFFICE_BUTTON_TEXT); btnShutdown = new PosButton(POSConstants.SHUTDOWN); btnClockOUt = new PosButton(new ClockInOutAction(false, true)); btnBackOffice.setVisible(false);/* w w w. j a va 2 s . c o m*/ btnSwitchBoard.setVisible(false); btnKitchenDisplay.setVisible(false); btnClockOUt.setVisible(false); JPanel panel3 = new JPanel(new GridLayout(1, 0, 5, 5)); JPanel panel4 = new JPanel(new MigLayout("fill, ins 0, hidemode 3", "sg, fill", "")); centerPanel.add(panel1, "cell 0 0, wrap, w " + width + "px, h " + height + "px, grow"); panel3.add(btnSwitchBoard); panel3.add(btnBackOffice); panel3.add(btnKitchenDisplay); OrderServiceExtension orderService = (OrderServiceExtension) ExtensionManager .getPlugin(OrderServiceExtension.class); if (orderService != null) { panel3.add(btnDriverView); btnDriverView.setVisible(false); } centerPanel.add(panel3, "cell 0 2, wrap, w " + width + "px, h " + height + "px, grow"); panel4.add(btnClockOUt, "grow"); //$NON-NLS-1$ panel4.add(btnConfigureDatabase, "grow"); //$NON-NLS-1$ panel4.add(btnShutdown, "grow"); //$NON-NLS-1$ centerPanel.add(panel4, "cell 0 3, wrap, w " + width + "px, h " + height + "px, grow"); if (TerminalConfig.isFullscreenMode()) { if (btnConfigureDatabase != null) { btnConfigureDatabase.setVisible(false); } if (btnShutdown != null) { btnShutdown.setVisible(false); } } else { if (!TerminalConfig.isShowDbConfigureButton()) { btnConfigureDatabase.setVisible(false); } } initActionHandlers(); mainPanel.add(centerPanel, BorderLayout.CENTER); return mainPanel; }
From source file:CalIcon.java
/** Construct the object with a Calendar object */ public CalIcon(Calendar c, boolean showT) { super();/*from w w w . ja v a 2 s.com*/ showTime = showT; myCal = c; setLayout(null); // we don't need another layout, ... if (showTime) { // System.err.println("Constructing and adding Clock"); clock = new Clock(); add(clock); clock.setBounds(0, 2, SIZE, 10); // clock.setBackground(Color.black); // clock.setForeground(Color.green); RBY = d.height - (RBH + (showTime ? 12 : 0) / 2); } else { RBY = 6; } RBX = 12; // raised box x offset // System.err.println("RBX, RBY = " + RBX + "," + RBY); dayNumbFont = new Font("Serif", Font.BOLD, 20); dayNumbFM = getFontMetrics(dayNumbFont); dayNameFont = new Font("SansSerif", Font.PLAIN, 10); dayNameFM = getFontMetrics(dayNameFont); monNameFont = new Font("SansSerif", Font.ITALIC, 10); monNameFM = getFontMetrics(monNameFont); }