How to set date value into JDateChooser field when clicked JTable row?

时间:2017-06-16 20:36:03

标签: java swing jdatechooser

I want to fill all the fields when I click on a table row. If I click a row in table it fills all the <!DOCTYPE html> <html> <head> <link href="https://fonts.googleapis.com/css?family=Work+Sans:400" rel="stylesheet"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"> </script> <link href="http://static.tumblr.com/y3vtpdx/Lskoeb774/favicon.png" rel="icon" sizes="32x32" type="image/png"> <title> Accoutrements </title> <meta content="width=device-width, initial-scale=1" name="viewport"> <meta charset="UTF-8"> <meta content="Accoutrements is a multidisciplinary studio specialising in art direction, design, photography and screen printing." name="description"> <meta content="accoutrements, art direction, design, manchester, photography, screen printing, studio” name="> <meta content="index,follow" name="robot"> <meta content="© 2017 Accoutrements. All rights reserved." name="copyright"> <meta content="Accoutrements" name="author"> <style> body {font-family: 'Work Sans', sans-serif; font-size: 18px; font-weight: 400; -webkit-font-smoothing: subpixel-antialiased; } .about { position: fixed; right: 40px; bottom: 40px; } .shop { position: fixed; right: 40px; top: 40px; } .studio { position: fixed; left: 40px; top: 40px; } .mood { position: fixed; left: 40px; bottom: 40px; } a { text-decoration: none; } .accoutrements { margin-top: 50vh; transform: translateY(-50%); margin-left: 20px; margin-right: 20px; } </style> </head> <body> <div class="corner_link about"> <a href="/about">About</a> </div> <div class="corner_link shop"> <a href="/">Shop</a> </div> <div class="corner_link studio"> <a href="/">Studio</a> </div> <div class="corner_link mood"> <a href="/">Mood</a> </div> <div class="corner_link accoutrements"> <div class="text"> <center> <p> Accoutrements is a multidisciplinary studio specialising in art direction, design, photography and screen printing. </p> <p> <a href="mailto:hello@accoutrements.studio">hello@accoutrements.studio</a> </p><a href="/">Back</a> </center> </div> <script> var safeColors = ['00', '33', '66', '99', 'cc', 'ff']; var rand = function() { return Math.floor(Math.random() * 6); }; var randomColor = function() { var r = safeColors[rand()]; var g = safeColors[rand()]; var b = safeColors[rand()]; return "#" + r + g + b; }; var color_1 = randomColor(); var color_2 = randomColor(); $(document).ready(function() { color_change(); $('#accoutrements').click(function() { color_change(); }); }); function color_change() { color_1 = randomColor(); color_2 = randomColor(); $('body').css('color', color_1); $('.corner_link a').css('color', color_1); $('.accoutrements').css('fill', color_1); $('body').css('background', color_2); $('.corner_link a').hover(function(){ $(this).css('color',color_2).css('background-color',color_1); }, function(){ $(this).css('color',color_1).css('background-color','transparent'); }); } </script> </div> </body> & JTextField components, but not the JComboBox.

How could I fill date chooser field when I select a row in table?

This is the code:

JDateChooser

0 个答案:

没有答案