Search Results

Search found 34 results on 2 pages for 'swings'.

Page 1/2 | 1 2  | Next Page >

  • how can i display the list data to an jtable in the swings!

    - by harish0510
    we are doing hibernate project,then problem is we want to display the users list from the database to userinterface by jtable concept. so, we are not able to display the data using jtable? code: Criteria criteria=session.createCriteria(User.class);//user is pojo class List studentlist= criteria.list(); System.out.println("records"+studentlist);// we want to display the list data to jtable.

    Read the article

  • tabs problem in java swings

    - by charan
    hi all... i had created 8 tabs in tabbed panel using java swings. the problem is when i enter data in any tab and click the save button. after clicking it leaves the present tab/panel and going to first tab. i have to retain on the same tab after clicking the save button.. so please help me on this

    Read the article

  • How to Generate the .Form file using .java file in swings

    - by vamshikpd
    Hi all, I am using SunJavaStudio Enterprise 8 and Swing frame work In swing, In My source folder, I have Demo.java and Demo.form file. Demo.form file is the Design file. If both files in the Source folder,java file shows source and design view in IDE. If I delete the Demo.form in source folder,The Design view doesn't show. I have only Demo.java file,How can i generate the Demo.form ? please can u help me urgent

    Read the article

  • Swing code in sockets

    - by asb
    I am learning swings for making GUI. I was thinking which is the best possible way in case of socket with swings. 1. The whole swing code goes in the server file. All the handlers and logic in on server side. Client only create socket. 2. The server have logic part. The code for the swing to display interface goes on client side. Client Creates stream to send / rec. data from server. Whch is the good way out of 2 ?

    Read the article

  • how can i display the database data to an jtable(dynamic) in the swings!

    - by harish0510
    we are using hibernate in business layer,but the task is, by using the jtable in swings to display the dynamic data(swings) from the database. code: Criteria criteria=session.createCriteria(User.class); //here user.class is pojo class in hibernate. List studentlist= criteria.list(); System.out.println("records"+studentlist); here the data is showing in hibernate console, but how to represent that data in the format of "jtable".

    Read the article

  • Is there concept of panel in BlackBerry

    - by user469999
    Hi, As we have the concepts of panel in Swings and AWT to which we can add controls.Do we have any concept of panel in BlackBerry. .Can any one please tell me about it.i have to create icons in BB and place it at the bottom of the screen to give a look of toolbar.I know we have the Toolbar package in BB 6.0 but then as all the simulators(like 8520 curve) doesnt support it i dont want to use that. Please help me to understand is there any concept of panel in BB as in AWT and swings Thanks in advance Yogesh Chaudhari

    Read the article

  • Rotation of two objects in relation

    - by DMan
    I've got a two sprites- I'll say I have a swing and a person. The swing 'swings' back and forth as I passed a rotation variable into spriteBatch.Draw(). Now I want my person to 'sit' on the swing, and am not sure of how to approach it. Since I want a relative to the swing sprite, I tried personPos=swingPos, but that obviously doesn't work as the swing's position is always the same (it's anchored to a point and swings from there). How would I make the person sprite follow the swinging part of the swing sprite, if that makes any sense?

    Read the article

  • Swing code in sockets

    - by asb
    I am learning swings for making GUI. I was thinking which is the best possible way in case of socket with swings. 1. The whole swing code goes in the server file. All the handlers and logic in on server side. Client only create socket. 2. The server have logic part. The code for the swing to display interface goes on client side. Client Creates stream to send / rec. data from server. Whch is the good way out of 2 ?

    Read the article

  • Security considerations for a default install?

    - by cpedros
    So with an old burned install CD of Feisty Fawn I went through the process of completely formatting the Windows OS and installing Ubuntu on an old XP laptop. I then went through the online upgrade to 10.4 LTS, only installing the gnome desktop environment package in the process. My (admittedly very open) question is that in this state and online, what security considerations do I have to immediately make for the default install? I understand that a lot of this swings on my intended use of the server, but just sitting there online what risks is it exposed to (this obviously goes far beyond the realm of linux, but I am not sure how these risks are accommodated in the default install). For example, I believe there is a firewall installed with Ubuntu but by default it allows all traffic. Any other guidelines would be much appreciated. Thanks

    Read the article

  • Security considerations for default install of Ubuntu

    - by cpedros
    So with an old burned install CD of Feisty Fawn I went through the process of completely formatting the Windows OS and installing Ubuntu on an old XP laptop. I then went through the online upgrade to 10.4 LTS, only installing the gnome desktop environment package in the process. My (admittedly very open) question is that in this state and online, what security considerations do I have to immediately make for the default install? I understand that a lot of this swings on my intended use of the server, but just sitting there online what risks is it exposed to (this obviously goes far beyond the realm of linux, but I am not sure how these risks are accommodated in the default install). For example, I believe there is a firewall installed with Ubuntu but by default it allows all traffic. Any other guidelines would be much appreciated. Thanks

    Read the article

  • changing jtoolbar images when JMenuItem is clicked

    - by ammayi100
    Hi, I need to develop a swing application with a menubar. When a menu is clicked, I have to display the menu items as icons in one bar. Same like when another menu is selected, corresponding menu items should be displayed in the bar. How can I achieve this functionality using Swings? Any help would be appreciated. Thanks in Advance, Maruthi Prasanna.

    Read the article

  • Little PM side post...

    - by edgaralgernon
    When adding new team memebers... off set the ramp up time by 1) having pre built machines ready and and easy method of getting the lastest tools, code base etc. I'm fortunate enough to be at a client that has a machine ready built and loaded when the dev arrives, all they have to do is grab the code. 2) have tasks broken down so that dependencies are as minimal as possible. In other words, to over come the mythical man month issue (as recently mentioned on slashdot) make sure the tasks you hand out have few dependencies on each other. That way the new dev is able to be productive fairly quickly. Here's our historical lead time... the bump in Jan is due to added work, by 2/18 we had added 4 new people over the last two weeks. And amazing the time starts coming down: Here's our averag work time: again time ramps up as we are adding more tasks, but then starts inching back down through out Feb and March. It's not that we beat the Mythical Man Month, and in fact I still believe the book and idea are highly relevant. But if you can break the tasks down and reduce the dependencies between the task then you can mitigate the effect. The tool used in this case is from AgileZen.com and some of the wild swings are due to inexperience with the system initially... but our average times as measured by the tool are matching real life. Also the tool appearst to measure in 24 hour days and 7 day weeks. so it isn't as bad as it looks. :-)

    Read the article

  • Create indefinitely oscillating pendulum in Farseer Physics 3.3.1/Box2d

    - by GONeale
    I am new to Farseer Physics and using version 3.3.1. I am after some help and would even be happy to receive Box2d answers just to ensure I get a response as I should then be able to convert it! -- Thanks ...After a lot of tinkering around I have managed to produce a thin vertical rectangle shape on the screen and I wish this to swing back and forth pinned at the top up to an angle I set (90 degrees would be fine for this sample). When it is approaching the top I wish it to slow down, then fall back the way it just came, increase speed then obviously slow to a stop at the top again. Almost how a swinging pirate ship would work at a theme park. This is the code I have so far which swings the shape, but it is seeming to lose speed on each swing eventually grinding to a halt: float playerWidth = ConvertUnits.ToSimUnits(5), playerHeight = ConvertUnits.ToSimUnits(68); playerPosition = ConvertUnits.ToSimUnits(-350, 0); playerBody = BodyFactory.CreateRectangle(World, playerWidth, playerHeight, 2f, playerPosition); playerBody.BodyType = BodyType.Dynamic; // create player sprite based on player body _rectangleSprite = new Sprite(ScreenManager.Assets.TextureFromShape(playerBody.FixtureList[0].Shape, MaterialType.Player, Color.Orange, 1f)); // Create swinging joint var joint = JointFactory.CreateFixedRevoluteJoint(World, playerBody, ConvertUnits.ToSimUnits(0, -34), playerBody.Position); If somebody could also provide the command I would need to pause the shape on a mouse click or keyboard command at it's current angle and then continue when I let go of the mouse click that would be super fantastic! (I actually posted this on StackOverflow as well before I realised there was a dedicated game development forum) Cheers

    Read the article

  • Need efficient way to keep enemy from getting hit multiple times by same source

    - by TenFour04
    My game's a simple 2D one, but this probably applies to many types of scenarios. Suppose my player has a sword, or a gun that shoots a projectile that can pass through and hit multiple enemies. While the sword is swinging, there is a duration where I am checking for the sword making contact with any enemy on every frame. But once an enemy is hit by that sword, I don't want him to continue getting hit over and over as the sword follows through. (I do want the sword to continue checking whether it is hitting other enemies.) I've thought of a couple different approaches (below), but they don't seem like good ones to me. I'm looking for a way that doesn't force cross-referencing (I don't want the enemy to have to send a message back to the sword/projectile). And I'd like to avoid generating/resetting multiple array lists with every attack. Each time the sword swings it generates a unique id (maybe by just incrementing a global static long). Every enemy keeps a list of id's of swipes or projectiles that have already hit them, so the enemy knows not to get hurt by something multiple times. Downside is that every enemy may have a big list to compare to. So projectiles and sword swipes would have to broadcast their end-of-life to all enemies and cause a search and remove on every enemy's array list. Seems kind of slow. Each sword swipe or projectile keeps its own list of enemies that it has already hit so it knows not to apply damage. Downsides: Have to generate a new list (probably pull from a pool and clear one) every time a sword is swung or a projectile shot. Also, this breaks down modularity, because now the sword has to send a message to the enemy, and the enemy has to send a message back to the sword. Seems to me that two-way streets like this are a great way to create very difficult-to-find bugs.

    Read the article

  • What is best way to update digital certificates from server to many clients when certificate expires

    - by pramodc84
    One of my friend is working on issue related to updating expired digital certificates. He is working on Java application(Swings I guess), which has 4000 clients. All those need a digital certificate to connect to the application and this certificate expires every year. At the end of year he needs to update the certificate credentials for all clients. Currently this is manual process, done by connecting to each of 4000 systems either locally or by remote connection. He is got task to convert this process to be an automated process. Please suggest some solutions.

    Read the article

  • Creating JTable Row Header

    - by Chandu
    Hi all, I'm new to JTable.I'm working in Swings using JTable & Toplink(JPA). I have two buttons "add Row", "Del Row" and I have some records displayed from db. when ever "add row" is clicked a new record, row header should be added to JTable with an auto increment number displayed in sequential order to the JTable Row Header. During deletion using "Del row " button the record has to be deleted & not its corresponding header so that next rows got updated to the previous headers & the auto increment number remain unchanged and always be in sequence. please help me on this regard. Thanks in advance, Chandu

    Read the article

  • Select in a many-to-many relationship in MySQL

    - by Joff Williams
    I have two tables in a MySQL database, Locations and Tags, and a third table LocationsTagsAssoc which associates the two tables and treats them as a many-to-many relationship. Table structure is as follows: Locations --------- ID int (Primary Key) Name varchar(128) LocationsTagsAssoc ------------------ ID int (Primary Key) LocationID int (Foreign Key) TagID int (Foreign Key) Tags ---- ID int (Primary Key) Name varchar(128) So each location can be tagged with multiple tagwords, and each tagword can be tagged to multiple locations. What I want to do is select only Locations which are tagged with all of the tag names supplied. For example: I want all locations which are tagged with both "trees" and "swings". Location "Park" should be selected, but location "Forest" should not. Any insight would be appreciated. Thanks!

    Read the article

  • How to go about with real GUI development with Java Swing and MVC.

    - by Myth17
    I am creating a Blackjack Card game emulator. I am a SCJP,familiar with Core Java concepts. I have a very basic understanding of Java swings and awt. Already finished writing the basic game logic,a CLI logic. My design includes several classes like, Dealer,Player,Table,Card,Casino and some others.. Enums for Cards and suite. I have read about MVC as a theoretical concept, familiar with the name 'design patters'(no understanding whatsoever as to how they are implemented) Everywhere I am suggested to learn while writing some real code.So I started off with this... I am stuck now, how should I go about writing code for my project?? Writing the GUI code and organising it within the already existent code.

    Read the article

  • Euler angles to Cartesian Coordinates for use with gluLookAt

    - by notrodash
    I have searched all of the internet but just couldn't find the answer. I am using LibGDX and this is part of my code that loops over and over: public void render() { GL11 gl = Gdx.gl11; float centerX = (float)Math.cos(yaw) * (float)Math.cos(pitch); float centerY = (float)Math.sin(yaw) * (float)Math.cos(pitch); float centerZ = (float)Math.sin(pitch); System.out.println(centerX+" "+centerY+" "+centerZ+" ~ "+GDXRacing.camera.position.x+" "+GDXRacing.camera.position.y+" "+GDXRacing.camera.position.z); Gdx.glu.gluLookAt(gl, GDXRacing.camera.position.x, GDXRacing.camera.position.y, GDXRacing.camera.position.z, centerX, centerY, centerZ, 0, 1, 0); if(Gdx.input.isKeyPressed(Keys.A)) { yaw--; } if(Gdx.input.isKeyPressed(Keys.D)) { yaw++; } } I might just be bad at the math, but I dont get it. Does someone have a good explanation and an idea about how to deal with this? I am trying to make a first person camera. By the way, the camera is translated by +10 on the Z axis. Currently when I run the application, this is what I get: Watch video in browser | Download video (for those who cant download the video, everything shakes in a clockwise/anticlockwise action, depending on if I increase or decrease the Yaw value) -Thank you. [edit] and with this code: public void render() { GL11 gl = Gdx.gl11; float centerX = (float)(MathUtils.cosDeg(yaw)*4); float centerY = 0; float centerZ = (float)(MathUtils.sinDeg(yaw)*4); System.out.println(centerX+" "+centerY+" "+centerZ+" ~ "+GDXRacing.camera.position.x+" "+GDXRacing.camera.position.y+" "+GDXRacing.camera.position.z); Gdx.glu.gluLookAt(gl, GDXRacing.camera.position.x, GDXRacing.camera.position.y, GDXRacing.camera.position.z, centerX, centerY, centerZ, 0, 1, 0); if(Gdx.input.isKeyPressed(Keys.A)) { yaw--; } if(Gdx.input.isKeyPressed(Keys.D)) { yaw++; } } it slowly swings from the left to the right. This approach worked for turning left and right for 2d games though. What am I doing wrong?

    Read the article

  • Why is my CPU being used while doing nothing?

    - by Jop
    I have installed Ubuntu GNOME in BIOS mode on my MacBook (BIOS mode so that the proprietary NVIDIA drivers work. I need them for gaming.). For some reason, a lot of CPU is being used while not really doing anything. It swings between 20-30% on both cores, usually. But when I look at the list of processes and sort by CPU usage, I do not see anything special. No processes intensively doing anything. How can I fix this? EDIT: Output of top command. jop@jop-MacBook:~$ top top - 17:08:02 up 41 min, 2 users, load average: 0,51, 0,69, 0,95 Tasks: 202 total, 2 running, 200 sleeping, 0 stopped, 0 zombie %Cpu(s): 11,9 us, 5,8 sy, 0,0 ni, 80,3 id, 0,5 wa, 0,0 hi, 1,5 si, 0,0 st KiB Mem: 7908316 total, 2919940 used, 4988376 free, 153248 buffers KiB Swap: 3906244 total, 0 used, 3906244 free, 1326544 cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 3785 root 20 0 195m 82m 26m S 22,9 1,1 2:43.77 Xorg 4429 jop 20 0 1543m 150m 60m S 7,3 1,9 1:26.26 compiz 4198 jop 20 0 633m 21m 11m S 1,7 0,3 0:04.96 unity-panel-ser 7425 jop 20 0 564m 18m 12m S 1,7 0,2 0:00.84 gnome-terminal 7019 jop 20 0 806m 89m 46m S 1,0 1,2 0:10.01 chrome 7323 jop 20 0 966m 93m 23m S 1,0 1,2 0:06.85 chrome 6742 root 20 0 0 0 0 S 0,7 0,0 0:00.43 kworker/0:3 3 root 20 0 0 0 0 S 0,3 0,0 0:06.01 ksoftirqd/0 7008 root 20 0 0 0 0 S 0,3 0,0 0:00.27 kworker/1:3 7302 jop 20 0 972m 96m 28m S 0,3 1,2 0:06.32 chrome 7310 jop 20 0 382m 63m 39m S 0,3 0,8 0:00.34 chrome 7498 jop 20 0 24840 1600 1120 R 0,3 0,0 0:00.22 top 1 root 20 0 27176 2944 1412 S 0,0 0,0 0:01.58 init 2 root 20 0 0 0 0 S 0,0 0,0 0:00.00 kthreadd 5 root 0 -20 0 0 0 S 0,0 0,0 0:00.00 kworker/0:0H 6 root 20 0 0 0 0 S 0,0 0,0 0:00.00 kworker/u4:0 7 root rt 0 0 0 0 S 0,0 0,0 0:02.04 migration/0 Even when xorg isn't so busy like when I copied, CPU usage is higher then what the processes use.

    Read the article

  • Tech Ed/BI Conference 2010: A Recovering Industry in a Recovering City

    - by andrewbrust
    I tried writing a post for this blog last night, while at the this year’s Microsoft Tech Ed and Business Intelligence conferences, in New Orleans. But I literally fell asleep while writing it.  That’s probably a sign that my readers might have done the same while reading it. Why the writer’s block? This was a very good show for me, but I think I was having trouble figuring out exactly why.  Now that I’m on the flight home, I’m starting to piece it together. One reason, for sure, was that I’ve spent years in both the developer and the BI worlds, and a show that combined the two was really enjoyable for me.  Typically, the subject matter, the attendees, the Microsoft execs and managers, and even the social circles have been separate.  This year’s Tech Ed facilitated a fusion of each of these previously segregated groups.  That was good for me as a speaker; for example, I facilitated a Birds of a Feather session on PowerPivot (Microsoft’s new self-service BI offering) which was well-attended, and by a large number of non-BI pros.  The fusion was good for me as an attendee too, as Microsoft BI, in the form of a new Pivot Viewer control, made it into the Day 1 keynote, demoed by Microsoft’s key BI champion, Amir Netz.  And it was good for me socially, as I was able to meet with peers in both camps, and at one location. Speaking of meeting with industry colleagues, I did a lot of that at this show.  Probably for the first time ever, I carefully scheduled and conducted a series of meetings with friends and business acquaintances in the developer tools, data visualization, utilities, publishing and training areas of the Microsoft ecosystem.  Beside the time efficiencies in conducting so many meetings, I discovered another benefit. I got a real handle on the tech industry’s economic health. The news here is good.  First of all, 2010 has been a great year for just about everyone I spoke to.  The mood is positive, energy is high, and people are working really hard.  This is, of course, refreshing to see, and it’s a huge relief.  Add to that the fact that this year’s Tech Ed was about 2.5 times larger in headcount than last year’s (based on numbers from unofficial, but reliable, sources), and the economic prognosis seems excellent.  But there’s more to it than that. Here’s the thing: everyone I talked to seems to be working, and succeeding, at changing their business models to adapt to changes in the industry.  Whether it’s the Internet’s impact on publishing and training, the increased importance of the developer audience in South Asia, the shift of affordable developer and business talent to unfamiliar locales abroad, or even lapses in Microsoft’s performance in the market, partner companies aren’t just rolling with the punches; they’re welcoming the changes and working them to their advantage.  No one seemed downtrodden, or even fatigued.  Even for businesses who have seen core revenue streams become commoditized, everyone seems to be changing their market strategy and winning.  Even Microsoft, of whom I have been critical recently, showed signs of successful hard work and playbook change, in the maturing of their cloud strategy, their commitment to it and their excitement around it.  And the embedded, managed, self-service BI strategy that Microsoft has been touting looks like it’s already being embraced by customers, even though PowerPivot, and other new Microsoft BI products, were released only recently. The collective optimism I have witnessed, and that I have felt, tells me good things about this industry and the economy.  The stock market had huge mood swings during my stay, and that may yet subdue the industry recovery I have seen this week.  Nonetheless, I am convinced that a strong foundation of hard work, innovative thinking and, if I may,  true renaissance is underlying this industry’s success. That kind of strength will generate a strong recovery, I am certain, whether now or once we’re past another round of choppy weather in the broader economy.  The fundamentals are good.

    Read the article

  • How to make a stack stable? Need help for an explicit resting contact scheme (2-dimensional)

    - by Register Sole
    Previously, I struggle with the sequential impulse-based method I developed. Thanks to jedediah referring me to this paper, I managed to rebuild the codes and implement the simultaneous impulse based method with Projected-Gauss-Seidel (PGS) iterative solver as described by Erin Catto (mentioned in the reference of the paper as [Catt05]). So here's how it currently is: The simulation handles 2-dimensional rotating convex polygons. Detection is using separating-axis test, with a SKIN, meaning closest points between two polygons is detected and determined if their distance is less than SKIN. To resolve collision, simultaneous impulse-based method is used. It is solved using iterative solver (PGS-solver) as in Erin Catto's paper. Error-correction is implemented using Baumgarte's stabilization (you can refer to either paper for this) using J V = beta/dt*overlap, J is the Jacobian for the constraints, V the matrix containing the velocities of the bodies, beta an error-correction parameter that is better be < 1, dt the time-step taken by the engine, and overlap, the overlap between the bodies (true overlap, so SKIN is ignored). However, it is still less stable than I expected :s I tried to stack hexagons (or squares, doesn't really matter), and even with only 4 to 5 of them, they would swing! Also note that I am not looking for a sleeping scheme. But I would settle if you have any explicit scheme to handle resting contacts. That said, I would be more than happy if you have a way of treating it generally (as continuous collision, instead of explicitly as a special state). Ideas I have tried: Using simultaneous position based error correction as described in the paper in section 5.3.2, turned out to be worse than the current scheme. If you want to know the parameters I used: Hexagons, side 50 (pixels) gravity 2400 (pixels/sec^2) time-step 1/60 (sec) beta 0.1 restitution 0 to 0.2 coeff. of friction 0.2 PGS iteration 10 initial separation 10 (pixels) mass 1 (unit is irrelevant for now, i modified velocity directly<-impulse method) inertia 1/1000 Thanks in advance! I really appreciate any help from you guys!! :) EDIT In response to Cholesky's comment about warm starting the solver and Baumgarte: Oh right, I forgot to mention! I do save the contact history and the impulse determined in this time step to be used as initial guess in the next time step. As for the Baumgarte, here's what actually happens in the code. Collision is detected when the bodies' closest distance is less than SKIN, meaning they are actually still separated. If at this moment, I used the PGS solver without Baumgarte, restitution of 0 alone would be able to stop the bodies, separated by a distance of ~SKIN, in mid-air! So this isn't right, I want to have the bodies touching each other. So I turn on the Baumgarte, where its role is actually to pull the bodies together! Weird I know, a scheme intended to push the body apart becomes useful for the reverse. Also, I found that if I increase the number of iteration to 100, stacks become much more stable, though the program becomes so slow. UPDATE Since the stack swings left and right, could it be something is wrong with my friction model? Current friction constraint: relative_tangential_velocity = 0

    Read the article

1 2  | Next Page >