Posts

Showing posts from February, 2011

Spring Security - Custom Pre Auth filter using java config -

i trying configure simple custom authentication filter checks token on every page of web app except '/login' page. right now, filter , running, no matter settings change, filter being called on every page, including '/login' have set permitall(). when access localhost:8080/login, expect not call filter based on configuration below, instead throws exception in filter because no session found. my question how limit filter pages except '/login' page? here config: @configuration @enablewebmvcsecurity public class securityconfig extends websecurityconfigureradapter{ private userdetailsservice userdetailsservice; private preauthenticatedauthenticationprovider preauthenticatedprovider; public securityconfig() { super(); userdetailsservice = new userdetailsserviceimpl(); userdetailsbynameservicewrapper<preauthenticatedauthenticationtoken> wrapper = new userdetailsbynameservicewrapper<preauthenticatedauthenticationtoken>

eclipse - Java Swing Blank JFrame coming up? -

i'm new swing, , wondering why application comes blank, , displays components. seems sporadic. there no exceptions thrown or that. comes blank jframe. @ times when close application , run again, shows components correctly, comes blank. doing wrong in code? i'm using eclipse ide, if matters. here's code: import java.applet.applet; import java.awt.borderlayout; import java.awt.flowlayout; import java.awt.gridlayout; import java.awt.event.actionevent; import java.awt.event.actionlistener; import java.awt.event.mouseevent; import java.awt.event.mouselistener; import java.io.file; import java.io.filenotfoundexception; import java.util.arraylist; import java.util.scanner; import javax.swing.*; public class main extends jframe implements actionlistener { private static final long serialversionuid = 1l; jradiobutton randomradiobutton; jradiobutton uniqueradiobutton; jradiobutton participationradiobutton; arraylist<student> allstudents; jframe

c# - How to edit text in a text file using StreamWriter? -

i creating application displays contents of text file in listbox. have created edit form edit items. edits displayed in listbox finding difficult save them text file. suggestions how can this? here code edit form: public static arraylist switches = new arraylist(); public static frmswitches frmkeepswitches = null; public static string inputdatafile = "leckysafe.txt"; listbox listboxswitches; public frmeditswitch(listbox lstswitch) { initializecomponent(); listboxswitches = lstswitch; } public string newtext { { return txtserialno.text; } } private void btnreset_click(object sender, eventargs e) { txtserialno.text = ""; } private void frmeditswitch_load(object sender, eventargs e) { txtserialno.text = listboxswitches.selecteditem.tostring(); } private void btncancel_click(object sender, eventargs e) { frmswi

javascript - How can I make my navbar stick to the bottom of an element upon reaching it? -

okay, i'm trying navbar stick bottom of 25px tall header have @ top of page. want navbar stick (become fixed — position: fixed ) when reaches bottom of header. a link codepen set can found below. apologize css , javascript/jquery stuff you'll see.... it's part of site/design though. i can't navbar (located @ bottom of screen) become fixed when reaches bottom of 25px (black-ish) header @ top of screen. i've tried 10+ solutions different places , none of them doing trick me.... http://codepen.io/anon/pen/wrzjwg what need add class nav first since have nav absolutely positioned in window find window height , minus nav , top bar have , add , remove classes there. following work: $(window).on('scroll', function () { if ( $(window).scrolltop() >= $(window).height() - 105) { $( '#mainnav' ).addclass("scrolled"); }else{ $( '#mainnav' ).removeclass("scrolled"); } }); then css #mainnav.scro

Generics in scala for addition -

class calculator[a:numeric]{ var x:a = _; def sum() : = x+x; //error: } compiler errors: can't resolve + symbol on a type mismatch; expected: string, actual: a class calculator[a: numeric]{ ... } is syntax sugar for class calculator[a](implicit n: numeric[a]){ ... } if in the docs numeric you'll find implicit def mkorderingops uses "enrich library" pattern add math operators + a type. you need import mkorderingops instance of numeric . keeping current class signature, can use implicitly[numeric[a]] instance. putting together, get: class calculator[a: numeric] { private val n = implicitly[numeric[a]] import n._ // mkorderingops included here var a: = _ def sum = + // + coming mkorderingops conversion }

java - Comparing 2 tables in different databases and do a delta -

i have standalone java application embedded h2 database(d1) , table t1. have mysql database(d2) table t2 hosted on server. requirement pull full data d2.t2 , push d1.t1 . t1 , t2 both have same table definition. first pull not problem. starting 2nd pull need pull rows got updated in d2.t2 , update in d1.t2 . how can achieved? have find delta last time pulled , update rows. if structures on both tables same can try following sql statement: insert your_table (your_column, ...) values (your_value, ...) on dublicate key update your_column = your_value, ... your have entries source database , execute above statement each 1 on target database.

jquery - Jcrop saves previous image -

i have preview cropping, , thumbnail displays part being cropped. whenever choose new image, preview not updated, instead keeps image being used previously. however, thumbnail updated, since shows new image. here code... function readurl(input) { if (input.files && input.files[0]) { var reader = new filereader(); reader.onload = function (e) { $('#previewsub2').attr('src', e.target.result); $('#previewsub').attr('src', e.target.result); ... var imgwidth = $("#previewsub2").width(); var imgheight = $("#previewsub2").height(); $("#previewsub").jcrop({ onchange: showpreview, onselect: showpreview, aspectratio: 1, setselect: [0,imgwidth,0,0], minsize: [90,90], addclass: 'jcrop-light' });

linux - sys_write will not output 0x0A -

i making calculator in assembly practice. working fine except when answer displayed, new line character (0x0a) not display. instead there box numbers 0014 inside (unicode probably). doing wrong? bits 64 ; 64-bit (amd64) code section .data stdin: equ 0 stdout: equ 1 sys_read: equ 0 sys_write: equ 1 sys_exit: equ 60 l_out1: db "simple assembly addition",0ah,": " l_len1: equ 27 l_out2: db ": " l_len2: equ 2 l_out3: db "answer is: " l_len3: equ 11 section .bss l_in1: resb 3 ; reserve 3 bytes (digits) l_in2: resb 3 ; reserve 3 bytes (digits) l_ans: resb 4 ; answer section .text global _start _start: mov rax,sys_write ; system call id mov rdi,stdout ; descriptor mov rsi,l_out1 mov rdx,l_len1 syscall mov rax,sys_read ; system call id mov rdi,stdin ; descriptor mov rsi,l_in1 mov rdx,3 ; see .bss syscall

c++ - Create the sums of all possible combinations of a vector -

i have been trying create program supposed find possible combinations of numbers in vector, , add them together, @ end check if match given number. not want find every number add specific number, rather sum of possible combinations. there many versions of question already, have managed make answers suit problem. i have tried recursive version, one: vector<int> set = {2,3,4,2}; vector<int> allpossible; vector<int> onepossible = {}; int sum = 0; void recursive_comb(int step_val, int array_index) { cout << "---" << endl; (int = array_index; < set.size(); i++){ onepossible.push_back(set[i]); sum = 0; (int j = 0; j < onepossible.size(); j++){ sum += onepossible[j]; if (step_val < 0){ onepossible = {}; } } cout << "adding " << sum << " allpossible" << endl; allpossible.push_back(sum);

javascript - scroll(0,0) working while scrollTo(0,0) not working? -

ehy guys. have strange kind of problem. i've created button scroll page bottom when user clicks it, , works if use scroll(0,0), while if use scrollto(0,0) (which should work in same way guess) doesn't work (the page doesn't scroll, nothing happens). here part of code: function should scroll top after click using scrollto doesn't anything. <button id="scrollainalto" onclick="scrollinalto();" style="background-color:transparent;border:none;display:none;"></button> <script> function scrollinalto() { window.scrollto(0,0); <-- 1 doesn't work //window.scroll(0,0); <-- 1 works } </script> the other thing have small script show , hide button scrolls page: here is. <script> $(document).ready(function(){ $(window).scroll(function(){ var $temp = $("#scrollainalto").scrolltop(); if (document.body.scrolltop > 50) {

html - Vertically center border on paragraphs -

i trying vertically center border around 'about' div class containing 3 paragraphs. border high, want move down vertically center it. can adjust height can't move border down @ all. <div class='about'> <p> javascript (/ˈdʒɑːvəˌskrɪpt/[5]) high-level, dynamic, untyped, , interpreted programming language. </p> <br> <p> despite naming, syntactic, , standard library similarities, javascript , java otherwise unrelated , have different semantics. </p> <br> <p> javascript used in environments not web-based, such pdf documents, site-specific browsers, , desktop widgets. </p> <br> </div> here css .about { width: 500px; text-align: center; margin: auto; padding-top: 50px; border-right: 1px solid white; border-left: 1px solid white; padding-right: 15px; padding-left: 15px; height: 200px; } it difficult visualize need without looking @ complete code on jsfiddle: ht

On fork() in Linux -

#include<stdio.h> int gictr0; int main(void){ int ipid; ipid = fork(); if (ipid == 0){ gictr0++; printf("in child\n"); printf("addr\t%x value\t%d\n",&gictr0,gictr0); } else{ gictr0+=2; printf("in parent\n"); printf("addr\t%x value\t%d\n",&gictr0,gictr0); } return 0; } the output ubuntu follows: in parent addr 601054 value 2 in child addr 601054 value 1 the value proper , expected. how address of variable remain same in child , parent process? there wrong in code? please suggest. memory addresses in unix-like vm system per-process. address obtain c & operator os-level construct, not addressing scheme maps directly bits in ram chips (or swapped-out vm pages). thus, it's possible same address in 2 different processes refer 2 different locations in "real" memory. fork spawns clone of parent process. both processes continue operating had before fork , entir

android - Coordinator Layout and Relative Layout issue -

Image
when create blank activity in android studio, given layout: <?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true" tools:context="com.example.mainactivity"> <android.support.design.widget.appbarlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/apptheme.appbaroverlay"> <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_heigh

json - How do I query a nested object in MongoDB? -

i have json schema looks this: { "_id" : objectid("5692a3e124de1e0ce2dfda22"), "title" : "a decade of decadence, pt. 2: legacy of dreams", "year" : 2013, "rated" : "pg-13", "released" : isodate("2013-09-13t04:00:00z"), "runtime" : 65, "countries" : [ "usa" ], "genres" : [ "documentary" ], "director" : "drew glick", "writers" : [ "drew glick" ], "actors" : [ "gordon auld", "howie boulware jr.", "tod boulware", "chen drachman" ], "plot" : "a behind scenes @ making of tiger in dark: decadence saga.", "poster" : null, "imdb" : { "id" : "tt

java - two dimensional array skipping values -

i trying read in file 2 dimensional array character character , have code that, after first line of characters read, sets nothing next space in array , sets character that's supposed in space 1 space ahead. how fix it? for(int x = 0; ((c = br.read()) != -1) && x < w.length*w.length; x++) { w.currentchar = (char) c; w.row = x/w.length; w.column = x%w.length; w.wumpusgrid[w.row][w.column] = w.currentchar; system.out.print(w.currentchar); system.out.print(w.row); system.out.print(w.column); } your problem '\n' @ end of line being read , assigned array, need skip character , keep count of skips can offset skipped characters: int offset = 0; for(int x = 0; ((c = br.read()) != -1) && x < w.length*w.length; x++) { if (c == '\n') { offset++; continue; } int pos = x - offset; w.currentchar = (char) c; w.row = pos/w.length; w.column = pos%w.length; w.wumpusgrid[w.row][w.colum

How to implement a verbose REGEX in Python -

i trying use verbose regular expression in python (2.7). if matters trying make easier go , more understand expression sometime in future. because new first created compact expression make sure getting wanted. here compact expression: test_verbose_item_pattern = re.compile('\n{1}\b?i[tt][ee][mm]\s+\d{1,2}\.?\(?[a-e]?\)?.*[^0-9]\n{1}') it works expected here verbose expression verbose_item_pattern = re.compile(""" \n{1} #begin new line allow 1 new line character \b? #allow word boundary ? allows 0 or 1 word boundaries \nitem or \n item # first word on line must begin capital [tt][ee][mm] #then need 1 character each of 3 sets allows unknown case \s+ # 1 or more white spaces allow \n not sure if should change \d{1,2} # require 1 or 2 digits \.? # there 0 or 1 periods after digits 1. or 1 \(? # there might 0 or 1 instance of open paren [a-e]? # there 0 or 1 instance of letter in range a-e \)? #

dom - Loading Specific Content from another page using Javascript -

index.html <script > function loadpage(){ var xhttp,rtext,x; xhttp=new xmlhttprequest(); xhttp.onreadystatechange=function(){ if (xhttp.readystate == 4 && xhttp.status == 200) { rtext=xhttp.responsetext; x = rtext.getelementbyid('bottom'); } document.getelementbyid("firstdiv").innerhtml=x; }; xhttp.open("get","first.html",true); xhttp.send(); } </script> <body> <div onclick="loadpage();">home</div> <div id="firstdiv"></div> </body> first.html <body> <div id="bottom"> <p>content 1</p> </div> <div id="bottom1"> content 2 </div> </body> i need load "bottom" div first.html index page using javascript , facing error. getelementbyid('bottom') not define proper

angularjs - routProvider controller inside of html file -

i can this? $routeprovider.when('/developer/logs', { templateurl: '/themes/default/template/developer_logs.html', controller: "developerlogsctrl" }); and in developer_logs.html <script> app.controller('developerlogsctrl', function($location, $rootscope) { $rootscope.pagetitle= 'developer logs'; }); </script> <div class="content-heading"> <ol class="breadcrumb"> <h1>logs</h1> <li><a href="/">dashboard</a> </li> <li>developer</li> <li class="active">logs</li> </ol> </div> <div>asfa8fhfga</div> i tried http://errors.angularjs.org/1.4.8/ng/areq?p0=developerlogsctrl&p1=not%20a you can't lazy load angular code within templates. there no built in lazy load mechanism either without using third

c++ - Run-Time Check Failure #2 Stack around the variable 'maze' were corrupted -

run-time check failure #2 stack around variable 'maze' corrupted. whenever compile , run program, receive error whenever program finishes running. believe problem happening in addpaths function in implementation. posted code in case. program creating maze , addpaths function "digging" paths user move through. path direction chosen @ random , paths drawn @ number spaces on maze. header: const int height = 3; const int width = 5; class coordinate { public: int row, column; }; class maze { public: maze(); ~maze(); void buildmaze(); void displaymaze(); void addpaths(); void startgame(); void moveplayer(int); bool solved(); int getkey(); void adddestinationtogrid(); private: char grid[width][height]; coordinate player; const static char player = 'p'; const static char destination = 'x'; const static char start = '

How to make a simple countdown in minutes for swift iOS? -

this question has answer here: problems animating countdown in swift sprite kit 2 answers how code simple timer countdown minutes example 5 minute countdown? like timer apple created. there way download , see xcode project apple apps? look nstimer simple way this. may not accurate relatively simple. nstimer calls function "update" every second (indicated 1.0 first argument) @iboutlet var countdownlabel: uilabel! var count = 300 override func viewdidload() { super.viewdidload() var timer = nstimer.scheduledtimerwithtimeinterval(1.0, target: self, selector: selector("update"), userinfo: nil, repeats: true) } func update() { if(count > 0){ let minutes = string(count / 60) let seconds = string(count % 60) countdownlabel.text = minutes + ":" + seconds count-- } }

java - NullPointerException on getResources().getDisplayMetrics().density -

context i'm working on small test code right now. selects image, resizes fit screen based on screen density. while this, makes copy of image @ size in xxhdpi display, , converts bitmap, string. string carried through intent next screen string turned bitmap , placed in imagebutton . this worked fine until added in chunk of code resize image given string based on density. odd thing copied , pasted dpi() method activity , there no issues in activity. code package com.example.zachary.imagetesting.resizing; import android.app.activity; import android.graphics.bitmap; import android.graphics.bitmapfactory; import android.os.bundle; import android.util.base64; import android.view.view; import android.widget.imagebutton; import android.widget.textview; import com.example.zachary.imagetesting.r; public class picturedecoded extends activity { textview text; imagebutton image; string string; bitmap picture; public float dpi(){return getresources().getdispl

javascript - Jquery Help - OnClick send Title to Clipboard -

i new javascript/jquery. i have below lines part of table dynamically creating db query. end goal jquery function when span clicked send contents of title attribute of span clipboard, far can't seem find value, getting undefined when click on of span/columns. <tr> <td id="1avifilepath"><span style='color:red;' onclick='copytoclipboard()' title='c:/ftp/dasales/working/file/event/1e03029b20160107101053001i100.avi' >false</span></td> <td id="1avisuccess"><span style='color:red;' onclick='copytoclipboard()' title='c:/tos3/1e03029b20160107101053001i100.mp4'>false</span></td> <td id="1avicopy"><span style='color:red;' onclick='copytoclipboard()' title='e:/originalavis/1e03029b20160107101053001i100.avi'>false</span></td> <td id="1avifail"><span style='color:red;

python - User input passed as a variable to subprocess.call -

im trying pass variable program being launched. having issues variable working here code works until passing of rhost, metasploit takes %rhost i need pass rhost variable straight after set rhosts . please :) #!/usr/bin/python import os,sys,re,subprocess rhost=raw_input("enter ipaddress range:") print ("your address range is\n" + rhost + "!") subprocess.call("xterm -e msfconsole -x 'sleep 2; use auxiliary/scanner/discovery/arp_sweep; set rhosts '%rhost'; exploit'",shell=true) end = raw_input('hit enter exit.') use string format: "xterm -e msfconsole -x 'sleep 2; use auxiliary/scanner/discovery/arp_sweep; set rhosts '\%{0}'; exploit'".format(rhost)

java - Providing tests as part of a library -

suppose interface like: public interface fooer { void foo(); boolean isfooed(); } this part of java library i'm writing. users of library supposed implement interface , pass objects library. i want provide way users test their implementation hold invariants my library code assumes. following above example: fooer f = getusersfooer(); f.foo(); // f.isfooed() must return true is possible, , if so, feasible or acceptable provide such tests part of library? (i don't know whether these considered unit tests or integration tests ... test modifications made single method using getter methods or primitive non-mutating methods) sure, can write classes like public class testfooer { public static boolean test(fooer f) { // ... } } but there "standard way", using usual testing frameworks (junit, ...) ?

c# - WPF datagrid how to get access to the row click -

seems wpf application inherited has datagrid <datagrid x:name="datagrid" itemssource="{binding alltroublecalls}" selectedindex="{binding selectedindex}" i want end setting background color yellow if textbox contains text in it. the text appears when click on rows in datagrid it seems based upon "binding" {binding ... } i have textbox added name it <textbox tooltipservice.showduration="120000" tooltip="{binding threattext}" name="txtthreat" text="{binding threattext}" textwrapping="wrap" acceptsreturn="true" verticalscrollbarvisibility="visible" horizontalscrollbarvisibility="visible" margin="3" grid.row="8" grid.column="1" grid.columnspan="3" grid.rowspan="1" isreadonly="true" height="30"/>

ios - Fit a UIView to screen -

Image
i add portrait orientation application. there way shrink or fit uiview (created in xib) screen? i have landscape sized views in xib files , set them opposite of using interface builder stretching (the center block). or possible in code? in code, can use self.myview.frame = self.view.bounds; . make stick way, self.myview.autoresizingmask = uiviewautoresizingstretchablewidth | uiviewautoresizingstretchableheight;

javascript - Can I output JSON where the ID is the key rather than it being an array in ASP.NET MVC (C#) -

so in asp.net mvc have controller action this: public jsonresult people() { var people = db.people.tolist(); return json(people); } and when ajaxed return this: [ { "id": 1, "name": "john smith" }, { "id": 2, "name": "daryl jackson" } ] however, i'm looking not json array of records shown above, more json object ids of each record key , record nested value, so: { 1: { "name": "john smith" }, 2: { "name": "daryl jackson" } } my initial thought create dictionary in c# similar structure , pass json() method not know how handle dictionary objects. is there way achieve kind of structure in c#? i'm having resort restructuring on client-side or using loops find record id i'm searching for. it'd nicer if record id in javascript. going wrong? i'm new asp.net mvc environment. any suggestions appreciated. thank

ios - unrecognized selector sent to class. 'calling methods in ClientViewController.mm' -

i trying call method in clientviewcontroller.mm class , keep getting error: terminating app due uncaught exception 'nsinvalidargumentexception', reason: '+ [clientviewcontroller testmethod]: unrecognized selector sent class i have class implements interface. void applerecognitionstatusobserver::onrecognitionstatuschanged (recognitionstatus newstatus) { switch(newstatus) { case kinprogress: [clientviewcontroller testmethod]; break; ....etc } } how can call clientviewcontroller methods c++ class? client view controller.h //imports uikit etc @interface clientviewcontroller : uiviewcontroller <avaudiorecorderdelegate>{ iboutlet uibutton *recobutton; // other buttons } @end // , .mm //#imports.... @interface clientviewcontroller () @end @implementation clientviewcontroller -(void)testmethod{ outlabel.text = @"has been called!"; } you s

java - Printing BufferedImage on JPanel -

i trying display bufferedimage onto jpanel when run program doesn't display anything. i imagine problem creation of bufferedimage but, limited understanding of java, have no idea problem might be. appreciate more information paintcomponent method (what super.paintcomponent(g) mean?) main.java public class main { public static void main (string[] args) { window.windowmake("this window"); } } window.java import java.awt.image.bufferedimage; import java.awt.graphics; import java.awt.image; import javax.swing.jcomponent; import javax.swing.jframe; import javax.imageio.imageio; public class window extends jframe { public static void windowmake(string title) { jframe jf = new jframe(); jf.setdefaultcloseoperation(jframe.exit_on_close); jf.setsize(300,300); jf.setvisible(true); jf.settitle(title); jf.add(new paint()); } } paint.java import java.io.ioexception; import java.io.file; import java.awt.image.bufferedimage; import java.aw

ruby - How to read/write a collection of objects as json -

i have collection of user classes want save json file. users = [] users << user.new('john', 'smith', 55) file.open("users.json", "w") |f| f.write(json.pretty_generate(users) end the problem user isn't being json'ified, saving file like: [ "#<user:0x000000101010eff40>", .. ] also, how read json file collection? the problem is, users variable still array of activerecord objects. need convert them json. users = [] users << user.new('john', 'smith', 55) file.open("users.json", "w") |f| f.write(json.pretty_generate(users.to_json) end

How can I get output file names after a C# MSBuild completes? -

i using buildmanager.defaultbuildmanager.build() build visual studio solution contains many projects. code looks lot this . once build completes, i'd copy output (dlls in case) target folder. but don't see way retrieve file names of build output buildresult. i can scan sln file , infer output locations. error-prone , tedious. build() returns buildresult . far can tell, buildresult not contain actual output file names. how can output file names after build completes? you provide output path build. clear folder before build , work newly generated files. var solutionpath = "..."; var outputpath = "..."; var pc = new projectcollection(); var properties = new dictionary<string, string>(); properties.add("outputpath", outputpath); var request = new buildrequestdata(solutionpath, properties, null, new string[] { "build" }, null); var result = buildmanager.defaultbuildmanager.build(new buildparameters(pc), re

android - How to get a more specific result from a JSON object in volley -

Image
this question has answer here: sending , parsing json objects [closed] 11 answers i trying more specific result getting. here code: // request string response provided url. jsonobjectrequest jsobjrequest = new jsonobjectrequest (request.method.get, url, (string)null, new response.listener<jsonobject>() { @override public void onresponse(jsonobject response) { try { jsonobject city = response.getjsonobject("city "); mtextview.settext("" + city.tostring()); } catch (jsonexception e) { e.printstacktrace(); } } }, new response.errorlistener() { @override public void onerrorresponse(volleyerror error)

java - How to change the (displayed) selected item on a disabled JComboBox? -

i'd change displayed selected item on disabled jcombobox programmatically. tried enabling before invoking setselecteditem , disabling right after the former , invoking updateui before disabling it might isn't intended, save me work replace combobox jlabel , dirty hack answer appreciated well. well, seems work okay me... import java.awt.eventqueue; import java.awt.gridbagconstraints; import java.awt.gridbaglayout; import java.awt.event.actionevent; import java.awt.event.actionlistener; import javax.swing.jbutton; import javax.swing.jcombobox; import javax.swing.jframe; import javax.swing.jpanel; import javax.swing.uimanager; import javax.swing.unsupportedlookandfeelexception; public class test { public static void main(string[] args) { new test(); } public test() { eventqueue.invokelater(new runnable() { @override public void run() { try { uimanager.setlookandfeel(