Two steps to make the panel a TRUE COLOR one

It seems that the MSI True Color Technology is fulfilled through a two-step procedure, hardware control and software modification.
Really impressive. 
 

This is your third posting on this topic.
If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
We don't have access to your database so the code can't be executed.

Similar Messages

  • Make the panel fit the image so MouseListener only invoke when click  image

    I want to add MouseListener to only the image itself. So I draw the image onto a image panel, add that panel onto the main panel, then add the main panel onto the frame. However, my problem is that the size of my image panel is too large, it take up almost the entire frame. So my mouselistener response not only when I click onto the image, but also anywhere in my image panel. I try to resize the image panel to fit the size of my image, but no luck. Is there a solution for this. I feel like, it got something to do with the layout. Here is my code, if you mind read it. Thank you very much
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.Image;
    import java.awt.Toolkit;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import javax.swing.*;
    public class ImageRotate
         private static final String LABEL = "MIDI PROTOCOL";
         private JPanel mainPanel = new JPanel();
         private JPanel labelPanel = new JPanel();
         public ImageRotate()
              mainPanel.setOpaque(true);
              mainPanel.setBackground(Color.YELLOW);
              mainPanel.setLayout(new BorderLayout());
              Font labelFont = new Font("serif", Font.BOLD, 30);
              createLabelPanel(LABEL, labelFont);
              labelPanel.setOpaque(false);
              mainPanel.add(labelPanel, BorderLayout.NORTH);
              Drawing d = new Drawing();
              d.setOpaque(true);
              d.addMouseListener(new MouseAdapter(){
                   public void mousePressed(MouseEvent e)
                        System.out.println("Pressing on the image");
              d.addMouseMotionListener(new MouseAdapter(){
                   public void mouseDragged(MouseEvent e)
                        System.out.println("Dragging the image");
                   public void mouseMoved(MouseEvent e)
              mainPanel.add(d, BorderLayout.CENTER);
         private void createLabelPanel(String str, Font font)
              JLabel label = new JLabel(str);
              label.setFont(font);
              label.setForeground(Color.RED);
              labelPanel.add(label);
         public JPanel getPanel()
              return mainPanel;
         public static void main(String args[])
              JFrame frame = new JFrame();
              frame.getContentPane().add(new ImageRotate().getPanel());
              frame.setSize(new Dimension(300, 300));
              frame.setVisible(true);
    class Drawing extends JPanel
         Image img;
         public Drawing()
              setSize(new Dimension(100,100));     //Try to make the panel fit the image...NO LUCK
              setBackground(Color.GREEN);     
              img = Toolkit.getDefaultToolkit().createImage("images/nob.gif");
         public void paintComponent(Graphics g)
              super.paintComponent(g);
              Graphics2D g2D = (Graphics2D)g;
              g2D.drawImage(img, 40, 40, this);
    }

    yunaeyes wrote:
    In class Drawing extends JPanel, I did try to to set the panel to the image size but no luck there,
    both setSize(new Dimension(100,100)), setPreferredSize(new Dimension(100,100)) does not make the panel smallerIt can be made to work. I find it hard to comment on unseen code.
    >
    BigDaddyLoveHandles wrote:
    I think a better approach is to handle the mouse click properly -- see if the click is over the image or not.Can you elaborate on this?The mousePressed method you posted assumes you are over the image. Check the mouse coordinates! If the component is bigger than the image this may not be so.

  • Currently I have two iPads connected to the same Apple ID and one connected to Game Center. I want to connect the second iPad to Game Center so that I do not lose my progress on apps like Clash of Clans.

    Currently I have two iPads connected to the same apple iPad. One is connected to game center(iPad air) one the other(iPad 2) is not connected to Game Center. How can I connect the iPad 2 Clash of Clan progress to game center when I already have another clash from iPad air connected?

    You cannot transfer content between two accounts. The sooner you make the conversion, the better. Just pick the new one and start using it(buying music etc).
    *A lot of people open new accounts when their email changes or they have a new email. You can just access your apple id account and change the primary email that you use to log in along with other details.

  • One of my apps disappeared..so how do i make the icon reappear??, One of my apps disappeared..so how do i make the icon reappear??

    One of my apps disappeared..so how do i make the icon reappear??, One of my apps disappeared..so how do i make the icon reappear??

    Download it again and reinstall it.
    Basic troubleshooting steps  
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • The white background makes my eyes hurt. How can I make the background a different color?

    The white background makes my eyes hurt. How can I make the background a different color?

    http://www.itworld.com/development/351097/setting-active-menu-item-based-current-url-jquer y

  • How to make the item in different color in a choice?

    if I have a choice and different items, how to make the item in different color?
    like:
    Choice ColorChooser = new Choice();
    ColorChooser.add("100");
    ColorChooser.add("200");
    ColorChooser.add("300");
    I want to show green, red and blue color for item 100, 200 and 300.
    I do not know how to do that, anyone can help?
    Thanks

    Please don't double (and now your up to triple) post. I realize that to you, your problem is the most important thing in the world and it would be nice if you could get several people working on it at the same time. However, the people answering your question do not get paid for it. They are doing it because they want to help someone. Posting several times only shows that you have no respect for them and are only concerned with your problem.

  • How  to make the panel scrollable

    Hi,
    I am trying to set one panel on the other panel with all the Labels button , i want the screen to become scrollable when the size is bigger then the size of the panel . I am getting an issue on setting one panel over another and the controls on the panel will become scrollable.
    Code:
    Main Class which call the sampleadvance search
    import java.awt.BorderLayout;
    * AGLM Main Screen
    * @author vishal.agarwal
    public class AGLMMainScreen extends JFrame {
         // Component Declaration
         private static final long serialVersionUID = 1L;
         private static AGLMMainScreen mframeAGLMMainScreen = null;
         private JMenuBar gsMenuBar;
         private JMenu gsFileMenu;
         private JMenu gsToolsMenu;
         private JMenu gsSamplesMenu;
         private JMenu gsSeedsMenu;
         private JMenu gsReportsMenu;
         private JMenu gsCustomersMenu;
         private JMenu gsHelpMenu;
         private JMenuItem gsExitAction;
         private JMenuItem gsGeneralConfigurationAction;
         private JMenuItem gsRegisterSampleAction;
         private JMenuItem gsRegisterSeedAction;
         private JMenuItem gsRegisterCustomerAction;
         private JMenuItem gsSearchSampleAction;
         private JMenuItem gsAdvanceSearchSampleAction;
         private JMenuItem gsSearchSeedAction;
         private JMenuItem gsSearchCustomerAction;
         private JMenuItem gsAboutAGLMAction;
         private JPanel contentPane;
         private JPanel footerPane;
         private JPanel panelTop = null;
         private JPanel panelLeft = null;
         private JPanel panelRight = null;
         private JLabel lblSelectedRightScreen = null;
         private JLabel lblMCMPLogo;
         private JLabel gslblSoftwareName;
         private JLabel gslblCopyRight;
         * AGLMMain Screen default constructor
         public AGLMMainScreen() {
              addFocusListener(new FocusAdapter() {
                   @Override
                   public void focusGained(FocusEvent arg0) {
              /*setIconImage(Toolkit.getDefaultToolkit().getImage(
                        AGLMMainScreen.class.getResource("/resources/open.png")));*/
              addWindowListener(new WindowAdapter() {
                   @Override
                   public void windowClosing(WindowEvent arg0) {
                        System.exit(0);
              setLocationByPlatform(true);
              setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
              setBounds(0, 0, 1366, 768);
              setVisible(true);
              // Create Menu Bar.
              GenerateMenuBar();
              contentPane = new JPanel();
              setContentPane(contentPane);
              contentPane.setLayout(null);
              // Create Top Panel.
              GenerateTopPanel();
              // Generate Footer Panel.
              GenerateFooterPanel();
              // Generate Left Panel.
              GenerateLeftPanel();
              // Generate Right Panel.
              GenerateRightPanel();
         public void GenerateMenuBar() {
              // Menu Bar
              gsMenuBar = new JMenuBar();
              gsFileMenu = new JMenu();
              gsFileMenu.setText("File");
              gsMenuBar.add(gsFileMenu);
              gsToolsMenu = new JMenu();
              gsToolsMenu.setText("Tool");
              gsMenuBar.add(gsToolsMenu);
              gsSamplesMenu = new JMenu();
              gsSamplesMenu.setText("Sample");
              gsMenuBar.add(gsSamplesMenu);
              gsSeedsMenu = new JMenu();
              gsSeedsMenu.setText("Seed");
              gsMenuBar.add(gsSeedsMenu);
              gsReportsMenu = new JMenu();
              gsReportsMenu.setText("Reports");
              gsMenuBar.add(gsReportsMenu);
              gsCustomersMenu = new JMenu();
              gsCustomersMenu.setText("Customer");
              gsMenuBar.add(gsCustomersMenu);
              gsHelpMenu = new JMenu();
              gsHelpMenu.setText("Help");
              gsMenuBar.add(gsHelpMenu);
              setJMenuBar(gsMenuBar);
              // Items on Menu Bar
              gsExitAction = new JMenuItem();
              gsExitAction.setText("Exit");
              /*gsExitAction.setIcon(new ImageIcon(AGLMMainScreen.class
                        .getResource("/resources/Cancel.png")));*/
              gsExitAction.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        int result = JOptionPane
                                  .showConfirmDialog(
                                            null,
                                            "Do you want to close",
                                            "Selection Option", JOptionPane.YES_NO_OPTION);
                        if (result == JOptionPane.YES_OPTION) {
                             dispose();
                        } else if (result == JOptionPane.NO_OPTION) {
              gsFileMenu.add(gsExitAction);
              gsGeneralConfigurationAction = new JMenuItem();
              gsGeneralConfigurationAction.setText("General Configuration");
              /*gsGeneralConfigurationAction.setIcon(new ImageIcon(AGLMMainScreen.class
                        .getResource("/resources/General.png")));*/
              gsGeneralConfigurationAction.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        // TODO
              gsToolsMenu.add(gsGeneralConfigurationAction);
              gsRegisterSampleAction = new JMenuItem(
                        "Register Sample");
              /*gsRegisterSampleAction.setIcon(new ImageIcon(AGLMMainScreen.class
                        .getResource("/resources/Export.png")));*/
              gsRegisterSampleAction.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        // TODO
              gsSamplesMenu.add(gsRegisterSampleAction);
              gsSearchSampleAction = new JMenuItem("Search Sample");
              /*gsSearchSampleAction.setIcon(new ImageIcon(AGLMMainScreen.class
                        .getResource("/resources/Export.png")));*/
              gsSearchSampleAction.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        // TODO
              gsSamplesMenu.add(gsSearchSampleAction);
              gsAdvanceSearchSampleAction = new JMenuItem("Advance Search Sample");
              /*gsAdvanceSearchSampleAction.setIcon(new ImageIcon(AGLMMainScreen.class
                        .getResource("/resources/Export.png")));*/
              gsAdvanceSearchSampleAction.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        // TODO
                        showSampleAdvanceSearchForm();
              gsSamplesMenu.add(gsAdvanceSearchSampleAction);
              gsRegisterSeedAction = new JMenuItem("Register Seed");
              /*gsRegisterSeedAction.setIcon(new ImageIcon(AGLMMainScreen.class
                        .getResource("/resources/Export.png")));*/
              gsRegisterSeedAction.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        // TODO
              gsSeedsMenu.add(gsRegisterSeedAction);
              gsSearchSeedAction = new JMenuItem("Seed Search");
              /*gsSearchSeedAction.setIcon(new ImageIcon(AGLMMainScreen.class
                        .getResource("/resources/Export.png")));*/
              gsSearchSeedAction.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        // TODO
              gsSeedsMenu.add(gsSearchSeedAction);
              gsRegisterCustomerAction = new JMenuItem("Register Customer");
              /*gsRegisterCustomerAction.setIcon(new ImageIcon(AGLMMainScreen.class
                        .getResource("/resources/Export.png")));*/
              gsRegisterCustomerAction.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        // TODO
              gsCustomersMenu.add(gsRegisterCustomerAction);
              gsSearchCustomerAction = new JMenuItem("Search Customer");
              /*gsSearchCustomerAction.setIcon(new ImageIcon(AGLMMainScreen.class
                        .getResource("/resources/Export.png")));*/
              gsSearchCustomerAction.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        // TODO
              gsCustomersMenu.add(gsSearchCustomerAction);
              gsAboutAGLMAction = new JMenuItem("About Tool");
              /*gsAboutAGLMAction.setIcon(new ImageIcon(AGLMMainScreen.class
                        .getResource("/resources/Export.png")));*/
              gsAboutAGLMAction.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent event) {
                        // TODO
              gsHelpMenu.add(gsAboutAGLMAction);
         public void GenerateTopPanel() {
              // Top Panel
              panelTop = new JPanel();
              panelTop.setBorder(UIManager.getBorder("DesktopIcon.border"));
              panelTop.setBounds(0, 0, 1350, 55);
              contentPane.add(panelTop);
              panelTop.setLayout(null);
              lblSelectedRightScreen = new JLabel();
              lblSelectedRightScreen.setForeground(SystemColor.textHighlight);
              lblSelectedRightScreen.setFont(new Font("Tahoma", Font.PLAIN, 10));
              lblSelectedRightScreen.setBounds(10, 30, 415, 13);
              panelTop.add(lblSelectedRightScreen);
              lblMCMPLogo = new JLabel();
              lblMCMPLogo.setHorizontalAlignment(SwingConstants.CENTER);
              /*lblMCMPLogo.setIcon(new ImageIcon(AGLMMainScreen.class
                        .getResource("/resources/open.png")));*/
              lblMCMPLogo.setForeground(SystemColor.textHighlight);
              lblMCMPLogo.setFont(new Font("Trebuchet MS", Font.PLAIN, 18));
              lblMCMPLogo.setBounds(612, 0, 63, 55);
              panelTop.add(lblMCMPLogo);
         public void GenerateFooterPanel() {
              footerPane = new JPanel();
              footerPane.setBounds(0, 684, 1350, 25);
              footerPane.setBorder(null);
              contentPane.add(footerPane);
              footerPane.setLayout(null);
              gslblCopyRight = new JLabel(
                        "All Rights Reserved (C) ");
              gslblCopyRight.setFont(new Font("Tahoma", Font.PLAIN, 13));
              gslblCopyRight.setBounds(10, 0, 168, 25);
              footerPane.add(gslblCopyRight);
              gslblSoftwareName = new JLabel("ABC");
              gslblSoftwareName.setFont(new Font("Tahoma", Font.PLAIN, 13));
              gslblSoftwareName.setHorizontalAlignment(SwingConstants.RIGHT);
              gslblSoftwareName.setBounds(1201, 0, 139, 25);
              footerPane.add(gslblSoftwareName);
         public void GenerateLeftPanel() {
              // Left Panel
              panelLeft = new JPanel();
              panelLeft.setIgnoreRepaint(true);
              panelLeft.setFont(new Font("Tahoma", Font.PLAIN, 13));
              panelLeft.setBorder(UIManager.getBorder("DesktopIcon.border"));
              panelLeft.setBounds(0, 60, 300, 620);
              contentPane.add(panelLeft);
              panelLeft.setLayout(new BorderLayout(0, 0));
         public void GenerateRightPanel() {
              panelRight = new JPanel();
              panelRight.setBackground(SystemColor.controlHighlight);
              panelRight.setFont(new Font("Tahoma", Font.PLAIN, 13));
              panelRight.setBorder(UIManager.getBorder("DesktopIcon.border"));
              panelRight.setBounds(305, 60, 1045, 620);
              contentPane.add(panelRight);
              panelRight.setLayout(new BoxLayout(panelRight, BoxLayout.X_AXIS));
         public void showSampleAdvanceSearchForm() {
              try {
                   panelRight.removeAll();
                   SampleAdvancedSearch registration = new SampleAdvancedSearch();
                   // registration.setLocation(panelRight.getLocation());
                   // registration.setBounds(panelRight.getBounds());
                   registration.setBounds(1, 1, 1000, 600);
                   panelRight.add(registration);
                   registration.setVisible(true);
                   repaint();
              } catch (Exception e) {
                   JOptionPane.showMessageDialog(null, e.getMessage());
         public void CloseAGLMMainScreenEvent() {
              int result = 0;
              if (result == JOptionPane.YES_OPTION) {
                   mframeAGLMMainScreen.dispose();
                   mframeAGLMMainScreen = null;
              } else if (result == JOptionPane.NO_OPTION) {
              } else {
         * Main Method
         public static void main(String[] args) {
              EventQueue.invokeLater(new Runnable() {
                   public void run() {
                        try {
                             mframeAGLMMainScreen = new AGLMMainScreen();
                             mframeAGLMMainScreen.setTitle("AGLM");
                             mframeAGLMMainScreen.setVisible(true);
                        } catch (Exception e) {
                             JOptionPane
                                       .showMessageDialog(
                                                 null,
                                                 "Error");
                             mframeAGLMMainScreen.dispose();
    SAmpleAdvanceSearch class
    import java.awt.Color;
    import java.awt.Component;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.SystemColor;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.util.ArrayList;
    import java.util.HashMap;
    import javax.swing.ButtonGroup;
    import javax.swing.JButton;
    import javax.swing.JComboBox;
    import javax.swing.JLabel;
    import javax.swing.JPanel;
    import javax.swing.JRadioButton;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JTextField;
    import javax.swing.ListSelectionModel;
    import javax.swing.ScrollPaneConstants;
    import javax.swing.SwingConstants;
    import javax.swing.border.LineBorder;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.JTableHeader;
    * @author Vishal Agarwal
    public class SampleAdvancedSearch extends JPanel {
         private static final long serialVersionUID = 1L;
         private JLabel lblFormName;
         private JPanel panelGeneralDetail;
         private JLabel lblSearchDetails;
         private JLabel lblMoistureFrom;
         private JLabel lblSampleNumberFrom;
         private JLabel lblOilContentFrom;
         private JLabel lblSeedType;
         private JLabel lblSampleRateFrom;
         private JTextField txtWeightTo;
         private JTextField txtSampleNumberFrom;
         private JTextField txtMoistureFrom;
         private JComboBox cmbSeedType;
         private JTextField txtMoistureTo;
         private JLabel lblSMSMobileNo;
         private JLabel lblWeightFrom;
         private JLabel lblEmail;
         private JLabel lblSampleNumberTo;
         private JLabel lblProcessingStatus;
         private JLabel lblPaymentStatus;
         private JTextField txtSMSMobileNo;
         private JTextField txtSampleNumberTo;
         private JTextField txtEmail;
         private JTextField txtWeightFrom;
         private JRadioButton rdbtnStatusProcessed;
         private JRadioButton rdbtnStatusUnProcessed;
         private JButton btnClear;
         private JButton btnSearch;
         private JLabel lblWeightTo;
         private JLabel lblMoistureTo;
         private JLabel lblOilContentTo;
         private JLabel lblSampleRateTo;
         private JTextField txtOilContentFrom;
         private JTextField txtSampleRateFrom;
         private JTextField txtOilContentTo;
         private JTextField txtSampleRateTo;
         private JRadioButton rdbtnStatusAll;
         private JRadioButton rdbtnPaymentStatusAll;
         private JLabel lblReceiptPrintStatus;
         private JRadioButton rdbtnReceiptStatusAll;
         private JLabel lblReportPrintStatus;
         private JRadioButton rdbtnReportStatusAll;
         private JRadioButton rdbtnReportStatusPrinted;
         private JRadioButton rdbtnReportStatusNonPrinted;
         private JRadioButton rdbtnReceiptStatusPrinted;
         private JRadioButton rdbtnReceiptStatusNonPrinted;
         private JRadioButton rdbtnPaymentStatusPaid;
         private JRadioButton rdbtnPaymentStatusDue;
         private JScrollPane scrollPaneSearchResult;
         private JTableHeader tblheaderSearchResult;
         private JTable tblSearchResult;
         private DefaultTableModel dtmSearchResult = null;
         private String[] gsobjColumnHeaders = null;
         AGLMMainScreen gsAGLMMainScreen;
         * @throws AGLEngineException
         public SampleAdvancedSearch()
                   throws Exception {
              setAutoscrolls(true);
              setMinimumSize(new Dimension(1000, 1000));
              try {
                   createScreenComponents();
                   createSearchResultScreenComponents();
              } catch (Exception e) {
                   throw e;
         private void createSearchResultScreenComponents() {
              gsobjColumnHeaders = new String[] { "SNo", "Sample Name", "Date",
                        "Sample Type", "Weight (gm)", "Moisture (%)",
                        "Oil Content (%)", "Payment Status", "Status", "Report Print",
                        "Mobile No", "Email Id", "Actions" };
              dtmSearchResult = new DefaultTableModel(null, gsobjColumnHeaders) {
                   private static final long serialVersionUID = 1L;
                   boolean[] columnEditables = new boolean[] { false, false, };
                   public boolean isCellEditable(int row, int column) {
                        return columnEditables[column];
                   @SuppressWarnings("unused")
                   public boolean isRowSelected(int row) {
                        return true;
              scrollPaneSearchResult = new JScrollPane();
              scrollPaneSearchResult
                        .setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
              scrollPaneSearchResult
                        .setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
              scrollPaneSearchResult.setEnabled(true);
              scrollPaneSearchResult.setBounds(10, 460, 900, 200);
              add(scrollPaneSearchResult);
              tblSearchResult = new JTable();
              tblSearchResult.setModel(dtmSearchResult);
              tblSearchResult
                        .setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
              tblSearchResult.setFont(new Font("Tahoma", Font.PLAIN, 11));
              tblSearchResult.setBackground(Color.WHITE);
              tblSearchResult.setBorder(new LineBorder(new Color(0, 0, 0)));
              tblSearchResult.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
              scrollPaneSearchResult.setViewportView(tblSearchResult);
              tblSearchResult.setRowHeight(40);
              for (int i = 0; i < tblSearchResult.getColumnCount(); i++) {
                   tblSearchResult.getColumnModel().getColumn(i).setCellRenderer(new TextAreaRenderer());
              tblSearchResult.setCellEditor(new TextAreaEditor());
              tblSearchResult.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    //          AGLUtility.packColumns(tblSearchResult, 4);
              tblSearchResult.getColumnModel().getColumn(2).setPreferredWidth(100);
              tblSearchResult.getColumnModel().getColumn(8).setPreferredWidth(100);
              tblSearchResult.getColumnModel().getColumn(10).setPreferredWidth(100);
              tblSearchResult.getColumnModel().getColumn(11).setPreferredWidth(150);
              tblSearchResult.getColumnModel().getColumn(12).setPreferredWidth(100);
              tblheaderSearchResult = tblSearchResult.getTableHeader();
              tblheaderSearchResult.setAlignmentX(Component.CENTER_ALIGNMENT);
              tblheaderSearchResult.setAlignmentY(Component.CENTER_ALIGNMENT);
         private void createScreenComponents() throws Exception {
              try {
                   setAlignmentX(Component.LEFT_ALIGNMENT);
                   setBackground(SystemColor.controlHighlight);
                   setLayout(null);
                   lblFormName = new JLabel("Sample Advance Search");
                   lblFormName.setHorizontalTextPosition(SwingConstants.CENTER);
                   lblFormName.setHorizontalAlignment(SwingConstants.LEFT);
                   lblFormName.setFont(new Font("Tahoma", Font.BOLD, 18));
                   lblFormName.setBounds(10, 10, 400, 30);
                   add(lblFormName);
                   // General Detail Panel
                   panelGeneralDetail = new JPanel();
                   panelGeneralDetail.setForeground(Color.RED);
                   panelGeneralDetail.setBorder(new LineBorder(new Color(0, 0, 0)));
                   panelGeneralDetail.setBounds(10, 40, 900, 410);
                   add(panelGeneralDetail);
                   panelGeneralDetail.setLayout(null);
                   lblSearchDetails = new JLabel("Sample Search Details :-");
                   lblSearchDetails.setHorizontalAlignment(SwingConstants.LEFT);
                   lblSearchDetails.setFont(new Font("Tahoma", Font.BOLD, 13));
                   lblSearchDetails.setBounds(20, 10, 231, 20);
                   panelGeneralDetail.add(lblSearchDetails);
                   lblMoistureFrom = new JLabel("Moisture Range (%) From ");
                   lblMoistureFrom.setForeground(Color.BLACK);
                   lblMoistureFrom.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblMoistureFrom.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblMoistureFrom.setBounds(30, 310, 200, 20);
                   panelGeneralDetail.add(lblMoistureFrom);
                   lblSampleNumberFrom = new JLabel("Sample Number From ");
                   lblSampleNumberFrom.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblSampleNumberFrom.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblSampleNumberFrom.setBounds(30, 250, 200, 20);
                   panelGeneralDetail.add(lblSampleNumberFrom);
                   lblOilContentFrom = new JLabel("Oil Content (%) From ");
                   lblOilContentFrom.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblOilContentFrom.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblOilContentFrom.setBounds(30, 340, 200, 20);
                   panelGeneralDetail.add(lblOilContentFrom);
                   txtWeightTo = new JTextField();
                   txtWeightTo.setBounds(490, 280, 170, 20);
                   panelGeneralDetail.add(txtWeightTo);
                   txtWeightTo.setColumns(10);
                   txtSampleNumberFrom = new JTextField();
                   txtSampleNumberFrom.setColumns(10);
                   txtSampleNumberFrom.setBounds(250, 250, 170, 20);
                   panelGeneralDetail.add(txtSampleNumberFrom);
                   txtMoistureFrom = new JTextField();
                   txtMoistureFrom.setColumns(10);
                   txtMoistureFrom.setBounds(250, 310, 170, 20);
                   panelGeneralDetail.add(txtMoistureFrom);
                   lblSeedType = new JLabel("Sample Seed Type ");
                   lblSeedType.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblSeedType.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblSeedType.setBounds(30, 40, 200, 20);
                   panelGeneralDetail.add(lblSeedType);
                   lblSampleRateFrom = new JLabel("Sample Testing Rate From ");
                   lblSampleRateFrom.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblSampleRateFrom.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblSampleRateFrom.setBounds(30, 370, 200, 20);
                   panelGeneralDetail.add(lblSampleRateFrom);
                   cmbSeedType = new JComboBox();
                   cmbSeedType.setBounds(250, 40, 170, 20);
                   panelGeneralDetail.add(cmbSeedType);
                   txtMoistureTo = new JTextField();
                   txtMoistureTo.setColumns(10);
                   txtMoistureTo.setBounds(490, 310, 170, 20);
                   panelGeneralDetail.add(txtMoistureTo);
                   lblSMSMobileNo = new JLabel("Registered Mobile No ");
                   lblSMSMobileNo.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblSMSMobileNo.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblSMSMobileNo.setBounds(30, 70, 200, 20);
                   panelGeneralDetail.add(lblSMSMobileNo);
                   lblWeightFrom = new JLabel("Weight Range (gm) From ");
                   lblWeightFrom.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblWeightFrom.setForeground(Color.BLACK);
                   lblWeightFrom.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblWeightFrom.setBounds(30, 280, 200, 20);
                   panelGeneralDetail.add(lblWeightFrom);
                   lblEmail = new JLabel("Registered Email ");
                   lblEmail.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblEmail.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblEmail.setBounds(30, 100, 200, 20);
                   panelGeneralDetail.add(lblEmail);
                   lblSampleNumberTo = new JLabel("To ");
                   lblSampleNumberTo.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblSampleNumberTo.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblSampleNumberTo.setBounds(430, 250, 50, 20);
                   panelGeneralDetail.add(lblSampleNumberTo);
                   lblProcessingStatus = new JLabel("Processing Status ");
                   lblProcessingStatus.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblProcessingStatus.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblProcessingStatus.setBounds(30, 130, 200, 20);
                   panelGeneralDetail.add(lblProcessingStatus);
                   lblPaymentStatus = new JLabel("Payment Status ");
                   lblPaymentStatus.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblPaymentStatus.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblPaymentStatus.setBounds(30, 160, 200, 20);
                   panelGeneralDetail.add(lblPaymentStatus);
                   txtSMSMobileNo = new JTextField();
                   txtSMSMobileNo.setColumns(10);
                   txtSMSMobileNo.setBounds(250, 70, 170, 20);
                   panelGeneralDetail.add(txtSMSMobileNo);
                   txtWeightFrom = new JTextField();
                   txtWeightFrom.setColumns(10);
                   txtWeightFrom.setBounds(250, 280, 170, 20);
                   panelGeneralDetail.add(txtWeightFrom);
                   txtEmail = new JTextField();
                   txtEmail.setColumns(10);
                   txtEmail.setBounds(250, 100, 170, 20);
                   panelGeneralDetail.add(txtEmail);
                   txtSampleNumberTo = new JTextField();
                   txtSampleNumberTo.setColumns(10);
                   txtSampleNumberTo.setBounds(490, 250, 170, 20);
                   panelGeneralDetail.add(txtSampleNumberTo);
                   rdbtnStatusAll = new JRadioButton("All");
                   rdbtnStatusAll.setSelected(true);
                   rdbtnStatusAll.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   rdbtnStatusAll.setBounds(250, 130, 50, 20);
                   panelGeneralDetail.add(rdbtnStatusAll);
                   rdbtnStatusProcessed = new JRadioButton("Processed");
                   rdbtnStatusProcessed.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   rdbtnStatusProcessed.setBounds(310, 130, 85, 20);
                   panelGeneralDetail.add(rdbtnStatusProcessed);
                   rdbtnStatusUnProcessed = new JRadioButton("Un-Processed");
                   rdbtnStatusUnProcessed.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   rdbtnStatusUnProcessed.setBounds(400, 130, 120, 20);
                   panelGeneralDetail.add(rdbtnStatusUnProcessed);
                   final ButtonGroup rdbtngrpProcessingStatus = new ButtonGroup();
                   rdbtngrpProcessingStatus.add(rdbtnStatusProcessed);
                   rdbtngrpProcessingStatus.add(rdbtnStatusUnProcessed);
                   rdbtngrpProcessingStatus.add(rdbtnStatusAll);
                   rdbtnPaymentStatusAll = new JRadioButton("All");
                   rdbtnPaymentStatusAll.setSelected(true);
                   rdbtnPaymentStatusAll.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   rdbtnPaymentStatusAll.setBounds(250, 160, 50, 20);
                   panelGeneralDetail.add(rdbtnPaymentStatusAll);
                   rdbtnPaymentStatusPaid = new JRadioButton("Paid");
                   rdbtnPaymentStatusPaid.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   rdbtnPaymentStatusPaid.setBounds(310, 160, 85, 20);
                   panelGeneralDetail.add(rdbtnPaymentStatusPaid);
                   rdbtnPaymentStatusDue = new JRadioButton("Due");
                   rdbtnPaymentStatusDue.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   rdbtnPaymentStatusDue.setBounds(400, 160, 120, 20);
                   panelGeneralDetail.add(rdbtnPaymentStatusDue);
                   final ButtonGroup rdbtngrpPaymentStatus = new ButtonGroup();
                   rdbtngrpPaymentStatus.add(rdbtnPaymentStatusAll);
                   rdbtngrpPaymentStatus.add(rdbtnPaymentStatusPaid);
                   rdbtngrpPaymentStatus.add(rdbtnPaymentStatusDue);
                   rdbtnReceiptStatusAll = new JRadioButton("All");
                   rdbtnReceiptStatusAll.setSelected(true);
                   rdbtnReceiptStatusAll.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   rdbtnReceiptStatusAll.setBounds(250, 190, 50, 20);
                   panelGeneralDetail.add(rdbtnReceiptStatusAll);
                   rdbtnReceiptStatusPrinted = new JRadioButton("Printed");
                   rdbtnReceiptStatusPrinted.setFont(new Font("Tahoma", Font.ITALIC,
                             13));
                   rdbtnReceiptStatusPrinted.setBounds(310, 190, 85, 20);
                   panelGeneralDetail.add(rdbtnReceiptStatusPrinted);
                   rdbtnReceiptStatusNonPrinted = new JRadioButton("Non Printed");
                   rdbtnReceiptStatusNonPrinted.setFont(new Font("Tahoma",
                             Font.ITALIC, 13));
                   rdbtnReceiptStatusNonPrinted.setBounds(400, 190, 120, 20);
                   panelGeneralDetail.add(rdbtnReceiptStatusNonPrinted);
                   final ButtonGroup rdbtngrpReceiptStatus = new ButtonGroup();
                   rdbtngrpReceiptStatus.add(rdbtnReceiptStatusAll);
                   rdbtngrpReceiptStatus.add(rdbtnReceiptStatusPrinted);
                   rdbtngrpReceiptStatus.add(rdbtnReceiptStatusNonPrinted);
                   rdbtnReportStatusAll = new JRadioButton("All");
                   rdbtnReportStatusAll.setSelected(true);
                   rdbtnReportStatusAll.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   rdbtnReportStatusAll.setBounds(250, 220, 50, 20);
                   panelGeneralDetail.add(rdbtnReportStatusAll);
                   rdbtnReportStatusPrinted = new JRadioButton("Printed");
                   rdbtnReportStatusPrinted
                             .setFont(new Font("Tahoma", Font.ITALIC, 13));
                   rdbtnReportStatusPrinted.setBounds(310, 220, 85, 20);
                   panelGeneralDetail.add(rdbtnReportStatusPrinted);
                   rdbtnReportStatusNonPrinted = new JRadioButton("Non Printed");
                   rdbtnReportStatusNonPrinted.setFont(new Font("Tahoma", Font.ITALIC,
                             13));
                   rdbtnReportStatusNonPrinted.setBounds(400, 220, 120, 20);
                   panelGeneralDetail.add(rdbtnReportStatusNonPrinted);
                   final ButtonGroup rdbtngrpReportStatus = new ButtonGroup();
                   rdbtngrpReportStatus.add(rdbtnReportStatusAll);
                   rdbtngrpReportStatus.add(rdbtnReportStatusPrinted);
                   rdbtngrpReportStatus.add(rdbtnReportStatusNonPrinted);
                   lblWeightTo = new JLabel("To ");
                   lblWeightTo.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblWeightTo.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblWeightTo.setBounds(430, 280, 50, 20);
                   panelGeneralDetail.add(lblWeightTo);
                   lblMoistureTo = new JLabel("To ");
                   lblMoistureTo.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblMoistureTo.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblMoistureTo.setBounds(430, 310, 50, 20);
                   panelGeneralDetail.add(lblMoistureTo);
                   lblOilContentTo = new JLabel("To ");
                   lblOilContentTo.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblOilContentTo.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblOilContentTo.setBounds(430, 340, 50, 20);
                   panelGeneralDetail.add(lblOilContentTo);
                   lblSampleRateTo = new JLabel("To ");
                   lblSampleRateTo.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblSampleRateTo.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblSampleRateTo.setBounds(430, 370, 50, 20);
                   panelGeneralDetail.add(lblSampleRateTo);
                   txtOilContentFrom = new JTextField();
                   txtOilContentFrom.setColumns(10);
                   txtOilContentFrom.setBounds(250, 340, 170, 20);
                   panelGeneralDetail.add(txtOilContentFrom);
                   txtSampleRateFrom = new JTextField();
                   txtSampleRateFrom.setColumns(10);
                   txtSampleRateFrom.setBounds(250, 370, 170, 20);
                   panelGeneralDetail.add(txtSampleRateFrom);
                   txtOilContentTo = new JTextField();
                   txtOilContentTo.setColumns(10);
                   txtOilContentTo.setBounds(490, 340, 170, 20);
                   panelGeneralDetail.add(txtOilContentTo);
                   txtSampleRateTo = new JTextField();
                   txtSampleRateTo.setColumns(10);
                   txtSampleRateTo.setBounds(490, 370, 170, 20);
                   panelGeneralDetail.add(txtSampleRateTo);
                   lblReceiptPrintStatus = new JLabel("Receipt Print Status ");
                   lblReceiptPrintStatus.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblReceiptPrintStatus.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblReceiptPrintStatus.setBounds(30, 190, 200, 20);
                   panelGeneralDetail.add(lblReceiptPrintStatus);
                   lblReportPrintStatus = new JLabel("Report Print Status ");
                   lblReportPrintStatus.setHorizontalAlignment(SwingConstants.RIGHT);
                   lblReportPrintStatus.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   lblReportPrintStatus.setBounds(30, 220, 200, 20);
                   panelGeneralDetail.add(lblReportPrintStatus);
                   // Buttons
                   btnClear = new JButton("Clear");
                   btnClear.setBounds(745, 317, 100, 30);
                   panelGeneralDetail.add(btnClear);
                   btnClear.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   btnSearch = new JButton("Search");
                   btnSearch.setBounds(745, 360, 100, 30);
                   panelGeneralDetail.add(btnSearch);
                   btnSearch.setFont(new Font("Tahoma", Font.ITALIC, 13));
                   btnSearch.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent arg0) {
                             searchSample();
              } catch (Exception e) {
                   throw new Exception("Error occured while generating data for screen. "
                                       + e.getMessage(), e);
         private void searchSample() {}
    }

    1. wall of unformatted code. Use \ tags when posting code.
    2. you're not even asking a question. You're just saying "it doesn't work" and then you dump the code. What do you expect? That people now go to debug it for you?                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to make the panel with scrollpane transparent?

    Thanks Camicker for your help, it solves the problem but i got a new problem i.e. i want to make that panel with scrollbar transparent for this i have tried setOpaqe(false) for both scrollpane and panel but it doesn't work. do u have any solution?

    I think camickr (not Camicker) already told you to set the opacity of the JScrollPane's viewport.
    Spend just a few minutes with the JScrollPane API and you'll find an exploded view showing the components that make up a scroll pane.
    db

  • How do I make the background of a photo one color and the object another color?

    I have a photo of a windmill with the sky and clouds as background.  I would like like to keep the clouds as is and change the color of the windmill.  How can I do this?

    You can use the HSL panel to change relationships between tones and colors. For example use Luminance mode to darken a sky by adjusting the blue and aqua channels or use Saturation mode to make an image monochrome except for one dominant color.
    If you want to change color completely first use the HSL panel to remove color and then paint with the adjustment brush set to a solid color; although that’s a bit more tricky.
    See examples below:

  • I have two laptops authorized with the same itunes account.  One computer is not working, so I want to know how I can access my playlists, etc. that are one that computer on the working one?

    I have two laptops authorized with the same itunes account.  However, there are different playlists on each laptop.  One laptop is messed up and I cannot get on the internet with it, so I was able to deauthorize it from the itunes account.   I thought that would bring the playlists over to the other computer, but it did not.  Is there a way to do it?

    These links may be helpful.
    How to Track and Report Stolen iPad
    http://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipad
    Reporting a lost or stolen Apple product
    http://support.apple.com/kb/ht2526
    Report Stolen iPad Tips and iPad Theft Prevention
    http://www.stolen-property.com/report-stolen-ipad.php
    How to recover a lost or stolen iPad
    http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/
    How to Find a Stolen iPad
    http://www.ehow.com/how_7586429_stolen-ipad.html
    Apple Product Lost or Stolen
    http://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-st olen
    Oops! iForgot My New iPad On the Plane; Now What?
    http://online.wsj.com/article/SB10001424052702303459004577362194012634000.html
     Cheers, Tom

  • How can I make the new update more colorful my mother can't read the white pages with tiny lines we hate it

    How can get the color back on my iPad 2 retina  my mother can not read the new white pages with tiny line or the text messages

    You can go into the settings and make the fonts bigger, also in the accessibility, make the contrast better and fonts bolder.
    There is also the 'invert colors' but it's not the best thing since it inverts everything.
    unfortunately this doesn't seem to be a good update for those with visual issues.
    http://www.apple.com/feedback/
    You can let Apple know. They won't answer but at least you can be added to the talley of those that have issues.

  • HT4906 do not want my photos on my Mac to stream to my iPad. Is there a way to make the photo stream to be one way?

    I would like for my photos to stream from my iPad to my Mac. I do not  want my photos from my Mac to stream onto my iPad. Is there a way to make the stream be one way?
    If this can't be done, how do I get the 1000+ photos off of my iPad onto my Mac?

    1. iPhoto Menu -> Preferences -> Photo Stream
    Uncheck the option 'Automatic Upload'. Now images won't automatically be passed on.
    Regards
    TD,

  • How do I make the form/pdf fit to one page?

    I designed my first form today and it's two pages long.  How do I get it all to fit on one page?  It will be saved as a pdf.

    While designing the form it will help to be in Page View.  This gives a very close approximation to how your fields will appear in the resulting pdf.  In the Design tab use menu View-> Page View.  All page breaks will now appear as dotted lines.  To aid in fitting more fields you can place forms side by side or reduce the font size.  Eliminating the Header also helps.
    Jeff Canepa
    Software Quality Engineer
    Adobe Systems, Inc.
    [email protected]

  • How do I make the particular column to editable one in the multicolumn list box?

    Hi,
    I am updating different parameters in the multicolumn list box.I am having four columns.
    I want to make 3 columns non editable to user and 4th column is editable one.
    How do i do this?
    Help me
    Regards
    Meenatchi

    Meenatchi wrote:
    I want to make 3 columns non editable to user and 4th column is editable one.
    Your question title & the message you ve posted are contradictory to each other.
    Normally a Multicolumn Listbox is a non-editable one, in that while you run you wont get the labeling tool to type some text.
    I think you can instead use a Table to achieve your purpose. Also see the below link.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=131631#M131631
    Or, the attached VI, modified from that post, of course.
    - Partha
    LabVIEW - Wires that catch bugs!
    Attachments:
    Make some columns of a Table only as Editable.vi ‏32 KB

  • Can we make the .class file into executable one? Urgent

    I just made some java programs, which consist of some GUI and robot, and I need to make them into executable file, mean .exe file. From this forum, there was a suggestion to use Excelsior JET that can make .class files into .exe files.
    and when I tried to use the program, it did the job well, but when I try to put the .exe file into another PC, it can not run as if I run it on the system that I made the .exe file.
    Is there anyone experience this before? is there other solution? and is the the .exe file that has just been generated already include all .class file that are needed by the main .class file that has been converted into .exe?
    Thnks for the helps...

    It is sort of possible.
    A good way of doing this is to use an application called Install Anywhere. With this, you can create an installation file for your application, and it does create an executable. Ive used this a few times myself, and it is really easy to use.
    I think another app to do this is one called JToExe (i think), and this basically creates an executable.
    I hope this helps,
    Osh

Maybe you are looking for

  • Need help with HP laser and inkjet printing.

    Anybody able to get an auto-rotate and center with the Mac? paper/quality/size consistant and saveable with HP printers? As much as I really hate the windows side of my computer, I really like the simplicity and usefulness of their print driver inter

  • Motorola Droid - Live Streaming Audio Doesn't Work

    When I try to listen to a live audio stream from http:\\kalx.berkeley.edu, I get a message stating "Cannot download.  The size of the item cannot be determined."  Is there any way I can fix this?

  • 2012 Mac Pro / Mountain Lion won't boot with ATI 5770

    2012 12 Core mac pro. I've got 2 GPUs installed: - Quadro 4000 for mac - ATI 5770 The Quadro is so loud and annoying that I'd like to unplug it for general use. Then plug it in for DaVinci or Premiere use. Problem is when I unplug (power) from the Qu

  • FXO not working

    I have a 3660 with a number of FXO cards in it, that are all working fine, except for one. If I reload the router the problem phone line works for a while (hour or so) them dies. When the line is ‘down’ if I try to call it, it rings and rings, but on

  • Problem old iMovie project to iMovieHD

    I upgraded to iMovieHD ages ago, and today decided to send an iMovie Project I created in old iMovie to DV tape. When I opened the project it asked to convert it to iMovieHD, when it did that playing the project was very jerky. I set it streaming to