Doubt in Theme and LAF


Hi all,
I have a basic doubt, what is the basic difference between Theme and LAF.
If I want to create my own LAF or theme where will i find the steps or procedures for writing the code.
Please give me some inputs on this

Posted On: Tuesday 23rd of October 2012 11:36:38 PM Total Views:  246
View Complete with Replies

RELATED TOPICS OF Swing / AWT / SWT PROGRAMMING LANGUAGE




doubt whit Netbeans

i use drag and drop to make jtextfield in my GUI, it looks like this: ID: (HERE IS THE JTEXTFIELD) now i want that the user only put numbers in that jtextfield and i got this code: jTextField1.addKeyListener(new KeyAdapter() { public void keyTyped(KeyEvent e) { char c = e.getKeyChar(); if ( ((c < '0') || (c > '9')) && (c != KeyEvent.VK_BACK_SPACE)) { e.consume(); // ignore event } } });
VIEWS ON THIS POST

156

Posted on:

Wednesday 19th September 2012
View Replies!

Swing doubt. not able to display pic on swing frame

package com.rajiv; import java.awt.Graphics; import java.awt.Image; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JPanel; import org.apache.log4j.Logger; public class MyDrawPanel1 extends JPanel{ private static final Logger logger = Logger.getLogger(MyDrawPanel1.class); public void paintComponent(Graphics g) { Image image = new ImageIcon("cat.png").getImage(); boolean b = g.drawImage(image, 3, 4, this); } public static void main(String[] args) { JFrame frame = new JFrame(); MyDrawPanel1 panel = new MyDrawPanel1(); frame.getContentPane().add(panel); frame.setSize(300, 300); frame.setVisible(true); frame.repaint(); } }
VIEWS ON THIS POST

182

Posted on:

Monday 24th September 2012
View Replies!

A doubt in setVisible() in gui

I have a simple doubt...i created a GUI application in java, a complex one with NetBeans IDE..and is running perfectly without any problems...here i used the setVisible method a number of times for the components like JList, JLayeredPane etc... can there be any problem in future in my application because of this setVisible method...if so is there any solution for that.... any help will be appreciated..
VIEWS ON THIS POST

159

Posted on:

Tuesday 2nd October 2012
View Replies!

JFrame doubt

Im new to swing, please clear me this doubt. import javax.swing.*; import java.awt.*; public class reference extends JFrame{ JPanel p1; JButton b; reference(){ b=new JButton("Click me"); setLayout(new FlowLayout()); add(b); setVisible(true); setSize(500,500); } public static void main(String str[]) { new reference(); } } I have just extended JFrame in the code, now when im calling the setLayout(), setVisible(), setSize() without any reference variable. I want to know which objects setLayout(), setVisible(), setSize() is being invoked. Whether its JFrame or its superclass Please correct me if im wrong. really confused.
VIEWS ON THIS POST

105

Posted on:

Wednesday 17th October 2012
View Replies!

doubt in AWTEventMulticaster

Hi When gothru the AWTEventMulticaster's mouseClick function I found that mouseClicked is fired two times. Colul anybody please explain why this is for Please refer below code. /** * Handles the mouseClicked event by invoking the * mouseClicked methods on listener-a and listener-b. * @param e the mouse event */ public void mouseClicked(MouseEvent e) { ((MouseListener)a).mouseClicked(e); ((MouseListener)b).mouseClicked(e); } I have a JTable and added a mouse listener to that. When I click on the table, the mouseClick function fires two times. Could any body please help
VIEWS ON THIS POST

107

Posted on:

Wednesday 17th October 2012
View Replies!

swing doubt

I have created a GUI for a tax invoice system in swing...the requirement states that this is not to be allowed to be resizeable. My problem is that when the GUI comes up i see a blank window, and only when i change the window size (by ignoring the requirement ) all the components show up.I call the repaint() method also...still doesn't work. Am i missing something\t
VIEWS ON THIS POST

114

Posted on:

Thursday 18th October 2012
View Replies!

small doubt in Swing appln using JPanel

i'm creating a small swing appln. in that i need to display my photo(jpg file) in the frame's WEST region. for that i created MyPanel class(inner class) to display it in the frame. i need the code snippet inside the paintComponent method to get my picture from a particular path.
VIEWS ON THIS POST

125

Posted on:

Thursday 18th October 2012
View Replies!

doubt in focus

hi, A field can lost focus by many ways. For example, pressing TAB, pressing SHIFT+TAB, mouse click on other fields, etc Is it possible to know how the focus of a Field is lost
VIEWS ON THIS POST

97

Posted on:

Monday 22nd October 2012
View Replies!

Loccalisation doubt

hi, i need to develope a swings application which should be in tamil language like if i am adding a product name like aaru it should give the equelant tamil word to that in the screen. can any help in this issue
VIEWS ON THIS POST

80

Posted on:

Monday 22nd October 2012
View Replies!