java - Customizing dynamically gene jFrame -


How to optimize

jFrame and font size for jLabel set on ?

  Last GeFreem Frame = New JFram ("Bill"); Frame.setLayout (new grid layout (0, 1)); Try {string sql = "SELECT * FROM order_detail"; Rs = st.executeQuery (SQL); While (rsnext ()) {string printLbl = rs.getString ("Prasad_name") + "X" + RSIISIITIIITIIITI .iIIIITIIIIIIT "+ +" + RSIIITI ("Prasadcast"); Frame.ed (new jlabble (printLL)); Frame.validate (); Frame.repaint (); } Frame.ed (new jlabel (jlab 82.getText ())); Frame.validate (); Frame.repaint (); } Hold (SQLException e) {System.out.println (e.getMessage ()); } Frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); Frame.Sets (700, 400); Frame.setVisible (true); Printjobjobjob = printerjob.jet printerjobe (); Job.setJobName ("frame"); Job.setPrintable (New Printable) {Public Entit Print (Graphics Page, Page Format PF, Int page New) {if (pageNum> 0) {Printable.NO_SUCH_PAGE;} Graphics2D g2 = (Graphics2D) Page : G2.translate (pf .getImageableX (), pf.getImageableY ()); framepinent (g2); print backpointsEXAGE_STS;}}); Boolean Fix = Job Print Diallog (); If (OK) {try {job.print (); } Hold (pre-printer prefix) {}} frame.Saveable (wrong);   

I created the new jFrame and added it to the bill using the jLabel , now I want to customize it. How to do this

How to customize jFrame and set font size for JLable?

You can use

  JLabel jlabel = new JLabel ("TEXT"); Jlabel.setFont (new font (jlabel.getFont (), font. PLAIN, 12));  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -