Disordered GUI formatting - maven

I'm creating a GUI in NetBeans 13 using Java Swing and Maven as my Built Tool, and I'm about to finish up when I noticed that my GUI formatting got disorganized.
I'm gonna send a picture of what my JFrame form should look like and the disordered one to further clarify my question.
How it initially looked like
The disordered version
I have a total of four JFrame Forms, namely, Final_Frame, Log_In, Register, and Loading_screen(my main class). Everything is working perfectly fine when I tried to run my project starting from Log_In to Final_Frame, Register to Final_Frame, or Log_in to Register to Final_Frame. But when I tried to add Loading_screen at the very start since this is my main class, although it doesn't affect the GUI format of my Log_In and/or Register, it started to affect the GUI formatting of my Final_Frame. I also don't know how my Loading_screen affected Final_Frame since my Loading_screen only has a couple of JPanel, JLabel, and a Progress Bar
I couldn't figure out the problem at all since it is not throwing an Exception so I tried to Clean my project and then Build again but the problem still occurs.
Hope you can help me, thank you so much.

Related

Xcode autocomplete showing results that don't exist on object

When using App Code, autocomplete will only show results directly related to my struct. This is a great feature as it keeps everything very clean and I know that accessing these properties isn't going to give me an error.
Except I don't like App Code and it's non native looking UI.
In Xcode it's quite different. Why am I getting flatMap, map, description, debugDescription?
Obviously if its my own code, I know which properties/functions are okay to use, because I wrote them. I can just ignore the noise. But if I'm using someone else's library this can slow things down. Especially when I'm just guessing or trying to remember a function.
Is there a way to fix this — to have Xcode not show me functions/properties that I can't use?
It always shows default system objects properties if the object/class is not found.
It's the behavior of Xcode

Ability to programme a playground application inside same project in swift

The situation is as follows:
I am trying to define a path in which a certain character travels in a game. This can be done by typing all coordinates for such path. However, this requires a lot of testing, recompiling, as you try to view such path in the product and see if it is what you wanted. This is very tedious
Clearly there is no Graphical Interface built in for every purpose, and obviously also for this case. Then, I proceed to built another application/ another few files that serve as a custom graphical interface for my path class: for editing paths by coordinates and change it interactively.
This does not really cause a problem. However, such an application does not fit in the app, nor make sense to be an application just for programming a specific class. Additionally, if I want to have an application for each of my more complicated data structures, it becomes very messy and hard to manage.
I recall that there is a playground feature in swift. This is perfect for me as it is interactive. And I am thinking:
Is there a way to programme an playground-similar application inside the same project?
(Since I demand programming to be pretty) Can this be done without switching to different projects just for this purpose? Is there such a feature?
Equivalently, is there a way to programme something that helps programming within swift, such as an extension for swift?
Again, I emphasis that, this is needed only for saving troubles and making an application more self-contained.
Turns out to be a stupid question. There is obviously an option in adding a new playground file to existing project.

Logic tests for OS X using Xcode 6

I want to implement unit testing in my Xcode project, and would like to run tests without requiring the application to be started.
Reasons for this are, I have a core data based document app, that also uses a cvdisplay link to control continuous rendering in a background thread.
It strikes me that I do not need a running application to test core data datamodel functionality, this should be distinct from view stuff anyway. Also I would like to isolate and performance test my background rendering processes, something that seems very difficult with the app running, but could easily do without the application running, just getting the right classes and feed it the correct data.
I've seen other questions that have answers for Xcode versions before six, but the answers don't seem to work for the current version.
The docs now make a distinction between application and library tests. Library tests are run against library targets.
I'm not sure i want to reorganise my code into distinct libraries at the moment, and would prefer to avoid it or fake it somehow.
I saw somewhere an openradar relating to this in ios, but I'm interested in osx.
Has anyone any insight into this?
EDIT : Learning to cope with the existing setup for now, testing with full app running, I can run some checks on that, then I close all documents and shut down the display link.
I can then run tests creating my own persistent store coordinator, in memory datastore and context, as well as testing my rendering classes without fear of conflict with the other display thread.
I'm now running into troubles with linking sources, I just can't seem to get it right, I fiddle with settings, it seems to work for a bit, then suddenly stops building again with Undefined symbols for architecture x86_64: errors, either that or problems linking with 3rd party private frameworks. I look through the web, change a few things, it starts working again. Then I add some tests, importing more of my classes, things stop working again.,.. Infuriating
EDIT 2: Pretty much all sorted now, but maybe not terribly efficient. For each test case class, I either open or close documents and start or stop the display link in the +(void)setup method. I don't do anything in the +(void)tearDown, and let the setup decide how to proceed based on the current state.
Although this means it's possible to flow from one test class to another minimizing document opens and closes, there doesn't seem to be a way to order the tests so that I could group them together.
BTW, I also solved my mentioned linking troubles (XCode 6 Testing Target Troubles), not really relevant to this question though.
It sounds like you landed on the standard solution: Give your app a way to tell when it's being stood up for testing rather than use, and then have applicationDidFinishLaunching: not do any of your usual launch-time behaviors, but leave it to specific tests to provide any setup they need.
You might benefit from creating multiple test suites to deal with different expected conditions, like all the tests that work around a specific document being open.

Organizing methods in a file using drag&drop in the structure view

Coming from eclipse, I am used to be able to move methods around in a file by simply dragging them around in the structure view (called overvew in eclipse).
I have noticed that it is not possible in RubyMine by default. Is there a way to enable it?
If not, is there a feature request for this?
All I have found yet is this: http://youtrack.jetbrains.com/issue/RUBY-2987, http://youtrack.jetbrains.com/issue/RUBY-9672 which considers only moving methods between classes,
Thank you
disclaimer: This started a copy of my attempt to get an answer on the JetBrains forum.
As #LazyOne said in his comment, there is an open feature request for drag&drop inside the structure view : http://youtrack.jetbrains.com/issue/IDEABKL-71.
It has been created in Feb 2005 and is not scheduled for any upcoming version, with only 11 votes so far, so no need to get your hopes up.

THREE.js seems to not work on localhost server

I am just starting out with THREE and have come across some odd failures which I believe are due to localhost / same-origin-poicy.
In short I created my own animation using armatures in Blender and exported using the three.js exporter plugin. The model displays but the animation doesn't run.
I used the online skinning animation example as the basis for the code and thought I may have incorrectly stripped out certain code that was causing it to fail but after looking for a couple of hours I have come to the conclusion I haven't ripped out anything incorrectly so...
To test if the example code worked locally I copied the online skinning animation example code including the buffalo.js/png files, modified the file references to map to my local copy and tried to run it in a local IIS server and all I get is the stats and no animation or model.
I checked the firebug console and only had a coupe of depreciation warnings no errors. I also checked with my model and code and I get no errors or warnings...
Anyone had this experience before? (I tested in chrome/firefox both had same behaviour)
Am happy to post code but the JSONLoader(ed) model is massive.
Thanks (and sorry for the long windedness of this SO question)
When it comes to running things on your local machine, have you tried the steps on this wiki page? How to run things locally
One example on the page suggests: chrome --allow-file-access-from-files
It's possible that your issue is related to the steps taken during your export. Without the exact errors or screenshots it's difficult to know where the issue originates from. Things to look out for:
Is your model being exported at the first frame?
Do you have the latest .py export plugin for Blender?
Using the latest version of Three.js?
Tried using THREE.SkinnedMesh?
Here is an article that gives you a brief overview of what is required for animated meshes within Three.js: Skeletal Animation
This second article provides a much more detailed tutorial, complete with example code at the bottom of the page: Skeletal Animation +1
In order to rule out same origin policy you can actually disable the security checks chrome uses when it starts up by adding this to the target window on your shortcut properties
--disable-web-security
see here for more information : Disable same origin policy in Chrome

Resources